Questions tagged [afhttpclient]

44 questions
1
vote
1 answer

AFHTTPClient and gzip

I have a web service class (MyAPIClient) that extends AFHTTPClient. All request to a web server are send using postPath method and the data is in JSON format. MyAPIClient contains only one method: - (id)initWithBaseURL:(NSURL *)url { self =…
sash
  • 8,423
  • 5
  • 63
  • 74
1
vote
0 answers

setAuthenticationChallengeBlock is undefined (not found) - AFNetworking

I am trying to set the basic authentication using the AFNetworking with 'setAuthenticationChallengeBlock' But compiler says its not found. Setting the username and password with 'setAuthorizationHeaderWithUsername' not working either Please Help!!
infiniteLoop
  • 2,135
  • 1
  • 25
  • 29
1
vote
1 answer

Pagination with AFIncrementalStore and AFRestClient

Can anyone show some sample on how to do the pagination with AFPaginator. I am using AFRestClient and I need to associate pagerId, offset and count parameters in my request for the entity. It looks to me that by using AFPaginator associating these…
0
votes
1 answer

AFNetworking upload image using AFHTTPClient

My question is why AFHTTPClient is slow to upload image. I am using the below code for uploading NSData *imageToUpload = UIImageJPEGRepresentation(uploadedImgView.image, 1.0); NSDictionary *parameters = [NSDictionary…
saurabh
  • 31
  • 9
0
votes
0 answers

IOS Background Mode AddOperation Queue

I want to send my files in background mode but when i switch to background uploading stops.But there is no problem while sending video.i sending video post method.However i send my images as string... my way to start operation …
user3236289
0
votes
1 answer

AFHTTPRequestOperation _totalBytesRead is Before or After deflating?

I am connecting to my own web service that I believe is sending back a gzipped response which is decompressed under the hood by the AF Networking library. I have verified that my server is sending the data compressed when the accept encoding gzip…
Mark Fraser
  • 3,160
  • 2
  • 29
  • 48
0
votes
0 answers

How to migrate AFNetworking 1.x to 2.x

I'm trying to migrate AFNetworking version 1.x to 2.x. In the Migration Guide, AFHTTPClient.m is separated to AFHTTPRequestOperationManager & AFHTTPSessionManager but I can't find AFHTTPClient registerHTTPOperationClass: in either…
0
votes
2 answers

method execute failure block ios

I have been using AFHTTPClient class' postPath:parameters:success:failure: method. but it always call failure block only. I have been using AFNetworking 0.10 library. Can anyone tell me the possible reasons for this. following is the code: NSURL…
0
votes
1 answer

POST Request with AFNetworkings AFHTTPSessionManager gets interpreted as GET on Heroku

I am currently trying to POST to my heroku server. Everything works fine locally but if i change my url for the AFHttpSessionmanager to the heroku App, my App wont work anymore cause the post requests gets interpreted as a GET Request on the…
Sebastian Boldt
  • 5,283
  • 9
  • 52
  • 64
0
votes
1 answer

Why does this API return its response in AFNetworking as a "failure", when it's exactly what it's supposed to be and the status code is 200?

I formulate a POST to an API called Diffbot and it returns exactly what I want; a bunch of parsed articles. (Here's how the API is interacted with.) I do this with the following code (with the exception of me removing my token): [AFDiffbotClient…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
0
votes
1 answer

Download Image with AFHTTP and save it to ALAsset

Does anyone know how to save an image to the Asset Library? I know that saving it to the Asset, the image will be available also in the Gallery of the iPad. I know how to get the file: AFHTTPRequestOperation *requestOperation =…
gdm
  • 7,647
  • 3
  • 41
  • 71
0
votes
3 answers

Blocks in sharedInstance and cancel

I've got a function downloading something from the internet. Then it maps the items and returns everything to the controller. The problem is that there may be a lot of items (facebook don't let to divide them) and i have to map them in the…
Nat
  • 12,032
  • 9
  • 56
  • 103
0
votes
1 answer

passing data from ios app to C# web service

I am trying to develop this iOS app that can communicate with a C# web service under the local network. I am using AFNetworking to achieve the communication. Now I have achieved reading xml data from the web service with the help of this tutorial,…
0
votes
1 answer

Perform AFHTTPClient request, in background, with NSOperationQueue chronologically

I have an HTTPClient request as follows : NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:urlStringMain]]; AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url]; NSDictionary *params = [NSDictionary…
n00bProgrammer
  • 4,261
  • 3
  • 32
  • 60
0
votes
2 answers

AFHTTPClient putpath method

I have problem with my below funct: NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: sportid, @"sport", country, SC_PAIS, team, SC_TEAM, …
santa
  • 147
  • 1
  • 4
  • 16