Questions tagged [afhttprequestoperation]

84 questions
1
vote
1 answer

File is not downloading from url

I have mp3 file in server url. Then i want to download the file store for later access. I'm using AFNetworking to download the file from url. I have been using AFHTTPRequestOperation for access the url, but i'm getting the url path in NSLog, but i…
user3743552
  • 143
  • 3
  • 13
1
vote
4 answers

How to handle empty responseObject in AFHTTPRequestOperation

I have a problem handling an empty responseObject in the AFHTTPRequestOperation during the GET request. I'm using the AFNetworking Library. If the content of the responsteObject is "0 objects" my application crashes when I'm trying to access keys…
andreaspfr
  • 2,298
  • 5
  • 42
  • 51
1
vote
1 answer

AFNetworking 2.0 / AFHTTPRequestOperation application/x-www-form-urlencoded

Been using AFNetworking 2.0 for the past two projects for a medium sized project to great success. This one call though, to post a user' login info, keep failing on me (server states incorrect login & password, login is the email, we've check on the…
David Homes
  • 2,725
  • 8
  • 33
  • 53
1
vote
1 answer

iOS: manage a AFHTTPRequestOperationManager

In my app I should download some JSON files, then I store these URL in a plist as you ca see in my code. After I create an 'AFHTTPRequestOperationManager' and I create a loop where I add some operation for the numbers of my 'url_list'. NSString*…
cyclingIsBetter
  • 17,447
  • 50
  • 156
  • 241
1
vote
1 answer

When I set my downloadProgressBlock for AFNetworking, it is only ever called once at the very end

I'm downloading an image and would like to present some form of progress for the download: NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:post.url]]; AFHTTPRequestOperation *imageOperation =…
user2005643
1
vote
2 answers

Using AFHTTPRequestOperationManager at a later time

I'm using AFNetworking for my app. I want to create a queue mechanism with different priority for each HTTP request. For that - I need to be able to create an HTTP Request using AFNetowrking but use it later. The example for creating an HTTP request…
YogevSitton
  • 10,068
  • 11
  • 62
  • 95
1
vote
1 answer

How to notify when a method containing AFHTTPRequestOperationManager has finished its job?

I have a method that uses AFHTTPRequestOperationManager POST to retrieve json face features: +(Face *)getFace:(UIImage *) image { __block Face *face = [[Face alloc]init]; AFHTTPRequestOperationManager *manager =…
1
vote
1 answer

AFHTTPRequestOperationManager how to get response from server

How to get JSON response? If PHP print some JSON whole request failed, if PHP does not print anything then response succeed. How to work with AFHTTPRequestOperation ? AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager…
atako katukas
  • 21
  • 1
  • 8
0
votes
1 answer

How I fetch allHTTPHeaderFields in AFNetworking 3.0

I am migrating my code from AFNetworking 2.x to 3.0. In AFNetworking 2.x AFHTTPRequestOPeration *requestOperation; self.formHash = requestOperation.request.allHTTPHeaderFields[@"FormHash"]; Would anyone help me to implement what is the alternative…
iPhone
  • 4,092
  • 3
  • 34
  • 58
0
votes
0 answers

AFNetworking: How do I measure HTTP request and response times?

Trying to debug AFNetworking in my application. I need to capture the time of both request and response time to get the duration. The duration will help me to set a reasonable timeout for the GET operation. The default 60 seconds timeout is not…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
0
votes
1 answer

AFNetworking 3 uploadTaskWithRequest / uploadTaskWithStreamedRequest handlers not called

I'm trying to upgrade a project that used to have AFNetworking 2.6.3 to AFNetworking 3.1. I have a URL request: NSURL *requestURL = [NSURL URLWithString:url]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; [request…
0
votes
1 answer

How to upload Image in server along with other parameters in Swift 3 iOS

##This is my Objective-c code where i have Send image to server. NSString *str=@"https://user.co/users/"; NSString *urlString=[[NSString stringWithFormat:@"%@",str] stringByAppendingString:@"add"]; AFHTTPSessionManager *manager1 =…
Inder_iOS
  • 1,636
  • 1
  • 12
  • 20
0
votes
2 answers

post method how to send only required parameters objective-c

I am sending multipart data to server text along with images and voice/image and voice are optional in this case when i am not sending the image data or voice the app is crashing please help on this ! -(void)uploadphoto{ NSString* mid= @"1"; …
0
votes
2 answers

AFHTTPRequestOperation getting NSPOSIXErrorDomain "No such file or directory"

I am using AFHTTPRequestOperation to download a large file to the Documents directory on my device. NSURLRequest *request = [NSURLRequest requestWithURL:vectorFile.url]; AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc]…
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
0
votes
0 answers

how to turn AFNetworking GET request to soap web service request?

The project I'm working on have using AFHTTPRequestOperation to retrieve data from the web service using the down below method but now the company want to change this method and make it a soap request can i modify the current code the project have…