How can I pass NSRequestURL like http://ww.a.com/Account/CheckValidUser?username=abc&password=abc123# through JSON with HTTP GET Method to server?. Passpword contain # chracter. How i can send this with NSUrlRequest in objective c.
try this:
NSString *myRequestString = @"http://ww.a.com/Account/CheckValidUser?username=abc&password=abc123#"
NSString *requestStr = [myRequestString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
Encode your string with NSUTF8StringEncoding
You can consult this link which clearly provides what types of html special character codes are present : -
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.