#pragma warning 修改处 网络测试
NSString *urlStr = [NSString stringWithFormat:@"http://188.188.1.202/tongtang/0/app/"];
WXLog("详情页接口:%@",urlStr);
// 创建AFHTTPRequestOperationManager对象
self.manager = [AFHTTPRequestOperationManager manager];
// 为AFHTTPRequestOperationManager对象指定使用HTTP响应解析器
self.manager.responseSerializer = [AFJSONResponseSerializer serializer];
// [self.manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Accept"];
// [self.manager.requestSerializer setValue:@"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
self.manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
// [self.manager GET:urlStr parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
// WXLog(@"data:%@",responseObject);
// } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
// WXLog(@"详情页请求失败,错误代码:%@",error);
// }];
//前边是value,后边是key
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"afqwqwfqwdwffff", @"client_type",
@"afqwqwfqwf", @"token_type",nil];
[self.manager POST:urlStr parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
WXLog(@"data:%@",responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
WXLog(@"详情页请求失败,错误代码:%@",error);
}];