afhttpclient

Alternative for enqueueHTTPRequestOperation in AFNetworking 2.0

半腔热情 提交于 2020-01-01 10:28:07
问题 We need to download files concurrently in our application. In earlier version of AFNetworking we have downloaded 2 files concurrently by using the code below: (AFHTTPClient) [_httpClient.operationQueue setMaxConcurrentOperationCount:MAX_CONCURRENT_OPERATIONS]; [self.httpClient enqueueHTTPRequestOperation:downloadObj.downloadOperation]; Now we want to upgrade our AFNetworking to 2.0. Instead of AFHTTPClient we are using AFHTTPRequestOperationManager and able to set

Timeout POSTING to S3 from iOS using signed URLS

风格不统一 提交于 2019-12-23 12:41:05
问题 My server is generating info for a signed upload to S3. When I pass that info on to iOS, it works for small files. Sometimes it works for bigger ones as well, but it often times out. I am currently testing on iOS 7 over WIFI. It's typical for it to time out after about 60% on an approximately 35 MB file, but sometimes it completes and sometimes it times out sooner. My server generates the following info, which I pass on as form parts to my POST. (I also tried it as parameters with similar

How to migrate AFHTTPClient, Afnetworking 1.0 to 2.0

北城以北 提交于 2019-12-08 00:57:47
问题 My problem is that I have a old code and I dont know how to change it. I had 1 class called API (AFHTTPClient) I have problems with 2 methods because I dont know how to put them in 2.0: This: -(void)commandWithParams:(NSMutableDictionary*)params onCompletion:(JSONResponseBlock)completionBlock { NSMutableURLRequest *apiRequest = [self multipartFormRequestWithMethod:@"POST" path:kAPIPath parameters:params constructingBodyWithBlock: ^(id formData) { //TODO: attach file if needed }];

Alternative for enqueueHTTPRequestOperation in AFNetworking 2.0

自闭症网瘾萝莉.ら 提交于 2019-12-04 08:09:05
We need to download files concurrently in our application. In earlier version of AFNetworking we have downloaded 2 files concurrently by using the code below: (AFHTTPClient) [_httpClient.operationQueue setMaxConcurrentOperationCount:MAX_CONCURRENT_OPERATIONS]; [self.httpClient enqueueHTTPRequestOperation:downloadObj.downloadOperation]; Now we want to upgrade our AFNetworking to 2.0. Instead of AFHTTPClient we are using AFHTTPRequestOperationManager and able to set setMaxConcurrentOperationCount: value But we are manually starting our download process. I am looking for alternative