//Json格式
 
    [mtbRequset setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    NSError *error;
    NSData *body = [NSJSONSerialization dataWithJSONObject:bodyDict options:NSJSONWritingPrettyPrinted error:&error];
    if (error) {
        MBErrorLog(@"%@", error);
    }
    mtbRequset.HTTPBody = body;
 
 
//x-www-form-urlencoded格式
    NSString *bodyStr = @"type=shentong&postid=3333557693903";
    mutablerequest.HTTPBody = [bodyStr dataUsingEncoding:NSUTF8StringEncoding];
    [mutablerequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
 

相关文章:

  • 2022-12-23
  • 2021-04-06
  • 2021-08-16
  • 2021-09-08
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案