Questions tagged [afhttprequestoperation]
84 questions
2
votes
1 answer
AFHTTPRequestOperationManager not sending parameter to php page
I am trying to send some key-value to one of my page (php page) using AFNetworking. I am using AFHTTPRequestOperationManager for this operation, the post is happening successfully however I am receiving blank values on server…

Saty
- 2,563
- 3
- 37
- 88
2
votes
1 answer
AFNetworking expected byte to read is -1
I am trying to download file from server using afnetworking from iPad.
I can successfully download file. But, strangely, my totalBytesExpectedToRead is always -1 although totalBytesRead is correct. Where did I make mistake?
[operation…

Khant Thu Linn
- 5,905
- 7
- 52
- 120
2
votes
3 answers
iOS- AFNETWORKING 2.0 -AFHTTPRequestOperationManager - POST-MULTIPART-REQUEST
I've built an API client for communicating with my web-server and all HTTP requests in my app are done using this class: (subclass of AFHTTPRequestOperationManager)
+ (SNPAPIClient *)sharedClient {
static SNPAPIClient *_sharedClient =…

Matan Guttman
- 648
- 8
- 16
1
vote
1 answer
Swift error Cannot convert value of type '(AFHTTPRequestOperation?, AnyObject?) -> ()
After I update xcode Version 8.0 (8A218a) swift 3, I got this error
Cannot convert value of type '(AFHTTPRequestOperation?, AnyObject?) -> ()' to expected argument type '((AFHTTPRequestOperation?, Any?) -> Void)!'
This is the following code that's…

stevengbu
- 243
- 1
- 3
- 13
1
vote
1 answer
iOS: AFHTTPSession manager response data
in my app I'm using the new AFN 3.0 and I have
AFHTTPSessionManager *manager
instead of
AFHTTPRequestOperation *operation
my problem is that before I was able to get some data from RequestOperation as:
NSURL *url =…

cyclingIsBetter
- 17,447
- 50
- 156
- 241
1
vote
1 answer
AFNetworking cancel post request
i know, this question ask before. But not working for me this scenario. i am working on AFNetworking for transfer layer. My code below.
AFHTTPRequestOperation *post;
AFHTTPRequestOperationManager *manager;
AFHTTPRequestOperationManager * manager =…

Emre Gürses
- 1,992
- 1
- 23
- 28
1
vote
2 answers
Time limit method in objective C
I have a networking method that request data from a server and then displaying it on the table view. But the problem is when the server is not responding or download takes too long I want to be able to just reload table view with data that is…

samitarmum
- 83
- 8
1
vote
1 answer
AFNetworking, AFHTTPRequestOperationManager failing on operation when it's a 200 code
having an odd issue with AFNetworking recently. I have a PHP backend and I'm using the SLIM framework. Simplified example of what is happening: If I use the link http://xxx.xxx.xx.xx/InstaAPI/hi this should be called:
$app->get('/hi', function()…

Kex
- 8,023
- 9
- 56
- 129
1
vote
1 answer
flickr not able to parse JSON
I am using flickr public API, Where I am facing issue with parsing of JSON. Here is my code.
NSString *urlString = @"https://api.flickr.com/services/feeds/photos_public.gne?format=json";
NSURL *url = [NSURL URLWithString:urlString];
…

ajay
- 3,245
- 4
- 31
- 59
1
vote
0 answers
(AFNetworking) how to adjust a header in an AFHTTPRequestOperation request?
How can I modify an AFHTTPRequestOperation header after creating it? In situations where an API request returns a 401, i need to refresh the access token and adjust every AFHTTPRequestOperation's header, and retry the same request operation with the…

3254523
- 3,016
- 7
- 29
- 43
1
vote
1 answer
Parse server giving unauthorised (401) while login in iOS 8 using AFNetworking
Hi I'm working on iOS sync component for saving data in parse server , i created a class from the parse web end and named the class as TicketDetail and added some fields with data, but when i try accessing the class from my app using AFNetworking…

Madhu
- 869
- 1
- 17
- 37
1
vote
0 answers
Cancel AFHttpRequestOperation
I'm downloading the image using AFHttpRequestOperation, i want to cancel this operation on a button click.How do i do this
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:strImagePath]];
self.managerDownloadActualImage =…

Ankita
- 469
- 4
- 15
1
vote
0 answers
AFHTTPRequestOperationManager doesn't send custom HTTP header
I want to use AFHTTPRequestOperationManager in my project. Each request should contain an authorization header. Otherwise server reports an error.
Well, I create an AFHTTPRequestOperationManager:
- (void) setManager:(AFHTTPRequestOperationManager…

iWheelBuy
- 5,470
- 2
- 37
- 71
1
vote
1 answer
NSOperationQueue: a sequence of NSOperation's with dependencies VS (maxConcurrentOperationCount == 1)?
For example I have 3 objects:
NSOperation *op1 = ...;
NSOperation *op2 = ...;
NSOperation *op3 = ...;
[op3 addDependency:op2];
[op2 addDependency:op1];
NSOperationQueue *queue = ...;
queue.maxConcurrentOperationCount = 1;
[queue…

Gargo
- 1,135
- 1
- 10
- 21
1
vote
0 answers
How to prevent download with same request from AFHTTPRequestOperation?multiple download occurs for same file
I am using AFHTTPRequestOperation to download a file from remote server now my problem is AFHTTPRequestOperation starts to download same request multiple time so i want to prevent the download process to execute for same request.
so basically what i…

BhavikKama
- 8,566
- 12
- 94
- 164