【AFNetworking 分析】POST 上传多表单类型数据
[TOC] Pre AFNetworking分析版本:4.0.1 调试所用代码(AFNetworking demo iOS) XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; [self.sessionManager.requestSerializer setValue:@"default value" forHTTPHeaderField:@"field"]; [self.sessionManager POST:@"post" parameters:@{@"key":@"value"} headers:@{@"field":@"value"} constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) { [formData appendPartWithFileData:[@"Data" dataUsingEncoding:NSUTF8StringEncoding] name:@"DataName" fileName:@"DataFileName" mimeType:@"data"]; } progress:nil success:^