How to make json post request?
问题 I have to make json post request with the following request parameters, { "method":"login", "data":{ "username":"korea", "password":"123456" } } I use the following code to make the request, NSString *jsonRequest = [NSString stringWithFormat:@"{""\"\method:\"\login\"\"\,""\data:\"{\"\"username\":\"%@\",\"password\":\"%@\"}",username,password]; NSLog(@"Request: %@", jsonRequest); NSURL *url = [NSURL URLWithString:@"http://myurl..."]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc]