I am able to use put method of afnetworking 2.0 successfully for putting data.
NSString* PUTURL = [NSString stringWithFormat:@"%@/updateestado/estado/%@/idJugador/%ld",BASEURl,[status urlEncodeUsingEncoding:NSUTF8StringEncoding],userId];
NSLog(@"REG URL----%@",PUTURL);
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager PUT:PUTURL parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"JSON: %@", responseObject); [self.NET_Delegate DelegateUpdateStatusResponce:responseObject];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) { [self.NET_Delegate DelegateUpdateStatusError:error]; }];
- I am able to upload video successfully using post method.
- But The requirement for uploading image is using PUT

- I followed the way given in Simple "PUT" file upload with AFNetworking but had two issues says multipartFormRequestWithMethod deprived & when trying the approach get 404 error.
No reference for this on afnetworking doc in github.
Query: I am working on uploading image using put first time, so i think i am missing some thing. Any reference or code samples to achieve this will be helpful. Thanks
3
votes
You may be encoding the image incorrectly - does it require a base64 encoding for the PUT request?
- Halpo
Thanks @Halpo for your comment, No it doesn't require base64 or any kind of encoding
- Yogesh Lolusare