AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
manager.requestSerializer=[AFJSONRequestSerializer serializer];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@
"text/html"
];
NSDictionary *parameters = @{@
"1"
:@
"XXXX"
,@
"2"
:@
"XXXX"
,@
"3"
:@
"XXXXX"
};
NSString *url=@
"http://xxxxx"
;
[manager POST:url parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@
"JSON: %@"
, responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@
"Error: %@"
, error);
}];