您的位置:首页 > 理论基础 > 计算机网络

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];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: