Questions tagged [afhttprequestoperation]

84 questions
0
votes
1 answer

AFNetworking NSString Response

I'm trying to use NSScanner to filter my response from a AFHTTPRequestOperation. The problem is I cannot return a string from the AFHTTPRequestOperation in my NSString method. Anyone have any ideas? -(NSString*)queryResponseID { //Find ID from…
0
votes
1 answer

AFHTTPRequestOperationManager return data in block

I created an APIController in my application that has several methods that call specific api urls and return a model object populated with the result of the api call. The api works with json and up to now my code looks like the…
0
votes
3 answers

iOS: reachability for AFNetworking

I' doing a 'Batch of Operations' in this way and it work fine NSMutableArray *mutableOperations = [NSMutableArray array]; for (NSString *stringURL in url_list) { NSURL *url = [NSURL URLWithString:stringURL]; NSURLRequest…
cyclingIsBetter
  • 17,447
  • 50
  • 156
  • 241
0
votes
1 answer

Using append:YES with operation.outputStream AFHTTPRequestOperation doesn't work

I am trying to download a text file and if this download is paused I am trying to append the rest of the file. The problem is that i am starting to download the rest from the right point but the file is not appending it overrides the previous file.…
ElizaS
  • 850
  • 1
  • 9
  • 22
0
votes
2 answers

Delete unfinished downloaded file if download gets cancelled

I'm downloading file with AFNetworking, using this code: NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:downloadFileUrl]]; AFHTTPRequestOperation * operation = [[AFHTTPRequestOperation alloc]…
Homam
  • 5,018
  • 4
  • 36
  • 39
0
votes
1 answer

AFNetworking - AFHTTPRequestOperation in a for loop (array enumeration)?

I am using AFNetworking, (AFHTTPRequestOperation) to make calls to the network and get the data back. I need to make use of the code in a for loop (enumeration of cards) to check for each card and get the data back, if the operation is successful, I…
0
votes
1 answer

How to implement a REST API HTTP PUT method to update a record in MongoDB with AFNetworking?

I created a full RESTful API using node.js and mongoDB. Using AFNetworking, I could easily implement GET to retrieve a list of products via the API but I'm having trouble doing a PUT method to update a record. The idea is check if there is a record…
-1
votes
2 answers

AFNetworking error code = -1005 "The network connection was lost"

I have made a global method to post a HTTP request. I want to globally handle the response and make the request again in case error code = -1005 occurs. How should I do that?. The code I am using is as below:- -…
-2
votes
1 answer

AFHTTPRequestOperationManager isn't call (no response/no faillure)

Here's my code : [[AFNetworkReachabilityManager sharedManager] startMonitoring]; mainManager = [AFHTTPRequestOperationManager manager]; mainManager.requestSerializer.timeoutInterval = 30; I initialise my AFHTTPRequestOperationManager like…
1 2 3 4 5
6