可能重复:
iPhone SDK Xcode 4.2 iOS 5-如何将 json 发送到 url?(POST 不是 GET)[已解决]
NSDictionary *requestDic=[NSDictionary dictionaryWithObjects:values forKeys:keys];
NSString *jsonreq=[requestDic JSONRepresentation];
NSURL *requrl=[NSURL URLWithString:[NSString stringWithFormat:@"%@index.php?r=%@&te=%@&noCheck=1&checkInstall=start",[Info serverUrl],[dictParameters objectForKey:@"r"],[dictParameters objectForKey:@"te"]]];
requrl = [NSURL URLWithString:[[requrl absoluteString] stringByAppendingString:subUrl]];
NSMutableURLRequest *req=[NSMutableURLRequest requestWithURL:requrl];
[req setHTTPMethod:@"POST"];
[req setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[req setValue:@"application/json-x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
NSData *requestData=[NSData dataWithBytes:[jsonreq UTF8String] length:[jsonreq length]];
[req setHTTPBody:requestData];
[browser loadRequest:req]