Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed using AFNetworking

后端 未结 3 1687
遇见更好的自我
遇见更好的自我 2020-12-15 05:34

I am using AFNetworking library to post data on server using POST method.

Following is my code

- (void) callLoginAPI:(NSDictionary *)dictProfile{
            


        
3条回答
  •  感情败类
    2020-12-15 06:27

    AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc]initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
    
    //Request Serializer
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    
    //Response Serializer
    AFJSONResponseSerializer *responseSerializer = [AFJSONResponseSerializer serializerWithReadingOptions:NSJSONReadingAllowFragments];
    manager.responseSerializer = responseSerializer;
    

提交回复
热议问题