-(void)PostStr { NSString *urlstring= @"http://116.255.130.35:11011/api/TestApi2/PostFromPosData"; NSString *poststr=@"hellowrold"; NSURL *url=[NSURL URLWithString:urlstring]; NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:url]; [request addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [request setHTTPMethod:@"POST"]; [request setHTTPBody:[poststr dataUsingEncoding:NSUTF8StringEncoding]]; NSOperationQueue *queue=[[NSOperationQueue alloc] init]; [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *respone, NSData *data, NSError *error) { if ([data length]>0 && error==nil) { NSString *jsonstring=[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSLog(jsonstring); } } ]; }