If you want to post json to server, you should post your parameters use this way below.
Use this way , you can then find out the "Content-Type" in your request header is "application/json".
AFJSONRequestSerializer *serializer = [AFJSONRequestSerializer serializer];
[serializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[serializer setValue:@"application/json" forHTTPHeaderField:@"Accept"];
manager.requestSerializer = serializer;
NSDictionary *paras = @{@"uid" : @(10020)};
[manager POST:@"http://your.request.url" parameters:paras success:^(AFHTTPRequestOperation *operation, id responseObject) {
}failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"the falire is %@", error);
}];
May this help. :)