Reputation: 3186
Please help me to find the error, my code is
NSURL *url = [NSURL URLWithString: @"http://www.xxxx.com/xxxx_webservice/login.php?user=%@&pass=%@&format=json",Username,Password];
Upvotes: 0
Views: 984
Reputation: 3204
Do it like this. First make a proper string of your URL and then encode it and then finally make it a NSURL
. Make sure your passing the correct and right set of parameters.
NSString *link = [NSString stringWithFormat:@"http://www.example.com/xx_webservice/login.php?user=%@&pass=%@&format=json",Username,Password];
NSString *encdLink = [link stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *url=[NSURL URLWithString:encdLink];
Upvotes: 7