ASIHttpRequest parses URL with spaces
2013-04-19 14:32
423 查看
When ASIHttpRequest parses URL with spaces , the App error will occur.
For Example . When you input something liking this :
http://myWebApp?clientName=Phone Li
The most troublesome issue will come to find you.
Using "stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding" ,when you get a bad url.
The sample of my code is:
NSString *newUrl = [oldUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
For Example . When you input something liking this :
http://myWebApp?clientName=Phone Li
The most troublesome issue will come to find you.
Using "stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding" ,when you get a bad url.
The sample of my code is:
NSString *newUrl = [oldUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
相关文章推荐
- ASIHTTPRequest Url 请求转码
- ASIHTTPRequest with block
- ASIHttpRequest出错提示:Unable to create request (bad url?)
- How to upload images with text using iPhone SDK using ASIHttpRequest ?
- ASIHttpRequest "_UTTypeCopyPreferredTagWithClass", referenced from:
- SpringMVC错误之No mapping found for HTTP request with [url]
- How to deal with "Incorrect NSStringEncoding value 0×0000 Error with ASIHTTPRequest" problem?
- ASIHTTPRequest with Https
- ASIHTTPRequest with Cookie
- 开源一个网络库ARHttpRequest,iOS适配NSURLSession/ASIHTTPRequest等,Android适配HttpURLConnection等
- ASIHTTPRequest 中url参数中文乱码
- ASIHttpRequest "_UTTypeCopyPreferredTagWithClass", referenced from:
- ASIHTTPRequest Unable to create request (bad url?) Error
- URL中的汉字和特殊字符编码,以及ASIHTTPRequest对此的处理
- 关于使用 ASIHTTPRequest URL中文参数乱码问题
- 关于使用 ASIHTTPRequest URL中文参数乱码问题
- ASIHTTPRequest Unable to create request (bad url?) Error
- ASIHTTPRequest with SSL
- ASIHTTPRequest 中url参数中文乱码
- Error Domain=ASIHTTPRequestErrorDomain Code=5 "Unable to create request (bad url?)" UserInfo=0x15f86