I am using AFNetworking library to post data on server using POST method.
Following is my code
- (void) callLoginAPI:(NSDictionary *)dictProfile{
AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc]initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
//Request Serializer
manager.requestSerializer = [AFJSONRequestSerializer serializer];
//Response Serializer
AFJSONResponseSerializer *responseSerializer = [AFJSONResponseSerializer serializerWithReadingOptions:NSJSONReadingAllowFragments];
manager.responseSerializer = responseSerializer;