Questions tagged [afhttpclient]

44 questions
0
votes
1 answer

NSURL going wrong

I have URL like this for example: http://somedomain.com/mi3/marketInfoData?request=login&user=user&password=password but why URL string not same with that I want... it…
Arie Prasetyo
  • 151
  • 2
  • 13
0
votes
2 answers

AFNetworking AFHTTPClient Subclassing, Singleton Client and Delegates

I'm writing a REST API layer with AFNetworking for an iOS project. I have some questions about what I have written so far, so I'm turning to stackoverflow for some guidance/answers. Here are the guidelines of what I'm trying to achieve: A base…
dornad
  • 1,274
  • 3
  • 17
  • 36
0
votes
2 answers

How to send array contain dictionary to server in ios?

hi i want to send a array of data to server array like { FeedStats: [{ FeedId: 1, FeedIndex: 1, }, { FeedId: 2, FeedIndex: 21, }]} i am try using afnetworking NSMutableArray *tempArray = [[NSMutableArray alloc]init]; NSDictionary…
sabeer
  • 603
  • 10
  • 28
0
votes
2 answers

Download an image with AFHTTPClient

I'm trying do download a jpeg-file from a server with AFNetworking. It seems to succeed accessing the server but the responseObject is empty. Following is the relevant code: AFHTTPClient *client = [[AFHTTPClient alloc]…
dfinki
  • 324
  • 4
  • 13
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…
0
votes
0 answers

setDownloadProgressBlock in AFHTTPClient subclass

I created subclass of AFHTTPClient. It works, but progress block return only final value (1.0). What should I change to get all the calculated values from setDownloadProgressBlock? - (void)exploreVenuesCenter:(CLLocationCoordinate2D)coordinate…
Shmidt
  • 16,436
  • 18
  • 88
  • 136
0
votes
1 answer

MBProgressHud, AFnetworking and refreshing data

I'm using AFnetworking to make a call to a server. While downloading I am using MBProgressHUD to show that data is being downloaded. So far everything works great. My issue is when I press the home button and then relaunch the app. I would like for…
user678392
  • 1,981
  • 3
  • 28
  • 50
0
votes
1 answer

AFHTTPRequest result null (even though I can see JSON in browser)

I am using a GET request to get JSON data. The call looks like this: -(void)getJSON{ //Where request is going AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"http://localhost:1234"]]; …
William Falcon
  • 9,813
  • 14
  • 67
  • 110
0
votes
1 answer

AFHTTPClient + enqueueBatchOfHTTPRequestOperations: handle cancellation and errors

My app needs to get some images from web, but I want user to be able to cancel this download (if its no connection, or it too slow, or w/e). App interface shouldn't be "frozen" in any case. So I'm using AFHTTPClient with…
0
votes
1 answer

Tell dispatch_main_queue to work up all its blocks from main queue?

I am doing a test with AFHTTPClient to test the backend response. __block id testedResponseObject = nil; [client getPath:path parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { testedResponseObject =…
david
  • 3,553
  • 4
  • 28
  • 39
0
votes
1 answer

Why is success block being called with incorrect path?

I accidentally mistyped the post path and noticed that although it's being wrong, the success block is called: [[APIClient sharedInstance] postPath:@"api_url" parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) { …
Malloc
  • 15,434
  • 34
  • 105
  • 192
-1
votes
1 answer

"message": "invalid parameters: Access is denied", while sending json request to server -ios

I'm posting a json to server, but I'm getting response from server like this- "message": "invalid parameters: Access is denied" i sending request like this- AFHTTPClient * httpClient = [[AFHTTPClient alloc] initWithBaseURL:url]; NSDictionary…
karthick
  • 39
  • 6
-2
votes
1 answer

AFHTTPClient does not send complete data

I am sending a wav file using the following code, however, the process stops at Sent 131072 of 141359 bytes So? Is there some problem with the code? Or am i missing something? NSString *vidURL = [[NSBundle mainBundle]…
ScarletWitch
  • 522
  • 6
  • 23
-5
votes
2 answers

AFNetworking/AFHTTPClient.h:88:10: - ios

In file included from /Users/project/API.m:9: In file included from /Users/project/API.h:9: /Users/project/../AFNetworking/AFHTTPClient.h:88:10: warning: MobileCoreServices framework not found in project, or not included in precompiled header.…
Aragon
  • 59
  • 2
  • 8
1 2
3