ASIHTTPRequest Unable to create request (bad url?) Error
2012-12-16 19:58
429 查看
一般都是因为url的参数列表中 含有不符合url格式的字符,需要用到 :
- (NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc;
enc 用
NSUTF8StringEncoding 就可以了。
注意,不能对整个 url都进行这个 stringByAddingPercentEscapesUsingEncoding,只能对域名后面
的部分encode,否则会出现 "不支持的url" 的 -1002的 url解析错误。
- (NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc;
enc 用
NSUTF8StringEncoding 就可以了。
注意,不能对整个 url都进行这个 stringByAddingPercentEscapesUsingEncoding,只能对域名后面
的部分encode,否则会出现 "不支持的url" 的 -1002的 url解析错误。
相关文章推荐
- Error Domain=ASIHTTPRequestErrorDomain Code=5 "Unable to create request (bad url?)" UserInfo=0x15f86
- ASIHTTPRequest Unable to create request (bad url?) Error
- ASIHttpRequest出错提示:Unable to create request (bad url?)
- Android开发:解决ErrorUnable to tunnel through proxy. Proxy returns HTTP1.1 400 Bad Request
- Android studio出现 Error:Unable to tunnel through proxy. Proxyreturns "HTTP/1.1 400 Bad Request"
- Android studio出现Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"的解决办法
- Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
- Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
- Unable to create request (bad url?) 解决方案
- AndroidStudio问题Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request解决方法
- Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
- Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
- Error:Unable to tunnel through proxy. Proxyreturns "HTTP/1.1 400 Bad Request"
- Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
- Android Studio出现Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"的解决办法
- Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
- Error:Unable to tunnel through proxy. Proxyreturns "HTTP/1.1 400 Bad Request"
- Android studio出现Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"的解决办法
- Android studio出现Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"的解决办法
- Android studio出现Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"的解决办法