Content-Type: form-data

swift:

varurlRequest =URLRequest(url: url!)

urlRequest.httpMethod="POST"

urlRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField:"Content-Type")

oc:

AFHTTPSessionManager*manager = [AFHTTPSessionManager sharedHTTPSession];

manager.requestSerializer= [AFHTTPRequestSerializer serializer];

//配置

[manager.requestSerializersetValue:@"application/x-www-form-urlencoded"forHTTPHeaderField:@"Content-Type"];

你可能感兴趣的:(Content-Type: form-data)