I have an API on the server that I am trying to get a JSON response from. I have used several request tools to simulate a call, and get the correct data back each time. Here is my request setup:
NSString *post = [NSString stringWithFormat:@"user_id=%@&last_sync=%@",user_id, last_sync];
NSURL *directoryURL = [NSURL URLWithString:directoryURI];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:directoryURL];
[request setHTTPMethod:@"POST"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:[NSData dataWithBytes:[post UTF8String] length:[post length]]];
The content type is also the same on my simulated requests. There are no errors returned, just no content.