I am trying to do something that seems uninteresting, but for some reason does not work.
I am trying to make a request to receive JSON data by sending the JSON parameter 'data' to the URL.
Here is the code I'm using:
NSDictionary *whatToPost= [NSDictionary dictionaryWithObjectsAndKeys: username, @"username", password, @"password", nil]; NSString *url = [NSString stringWithFormat:@"http://domain.com/user/get?data=%@", [whatToPost JSONString]]; NSURL *theUrl = [NSURL URLWithString: [url stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
When I set a breakpoint, Url is null. I canβt understand why this breaks down, but I see something in the package {or "violates it. Any ideas? Should I just switch to POST?
Ryanl source share