问一下下afHttp网络访问怎么添加请求头和指定sessionId

iOS 码拜 8年前 (2016-06-04) 1746次浏览
rt;
问一下下afHttp网络访问怎么添加请求头和指定sessionId
解决方案

40

试试AFN?

AFHTTPRequestOperationManager *mgr = [AFHTTPRequestOperationManager manager];
NSMutableDictionary *params = [NSMutableDictionary dictionary];
params[@"xxx"] = xxx;
[mgr POST:xxx parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
} success:^(AFHTTPRequestOperation *operation, NSDictionary *responseObject) {
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
}];

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明问一下下afHttp网络访问怎么添加请求头和指定sessionId
喜欢 (0)
[1034331897@qq.com]
分享 (0)