asihttprequest

ASIHTTPRequest alternative

会有一股神秘感。 提交于 2019-11-29 02:33:58
I am using currently ASIHTTPRequest for communicating with the server, however it's causing crashes. The bug is known for a long time, but is still an issue. Therefore: Are there good alternatives to ASIHTTPRequest? I am flexible on the server side, i could also use sockets or using something else. What would you recommenend for server client communication? Here is the link to the topic where the author is giving some ASIHTTPRequest alternatives . List of them with links from topic: AFNetworking LRResty RestKit AWS SDK for iOS ShareKit NSURLRequest/NSURLConnection I know it's probably not the

Why should I prefer ASIHTTPRequest over NSURLConnection for downloading files from the web?

独自空忆成欢 提交于 2019-11-29 02:27:09
问题 I've seen a couple of times people using ASIHTTPRequest to download files. Now I wonder why? What are the core benefits over NSURLConnection? 回答1: There are several reasons. In my mind these are the major ones: ASIHTTPRequest allows to specify a delegate for each request (vs. one delegate for a whole NSURLConnection ); this is useful because each request has in principle a different processing once you get the data you were waiting for; ASIHTTPRequest supports a caching mechanism that make

What are alternatives to NSURLConnection for chunked transfer encoding

百般思念 提交于 2019-11-29 02:01:52
I've checked for other questions relevant to this, but the only answer is "Use ASIHTTPRequest " as this is no longer being developed I wanted to ask what alternatives people are using, whilst working on our SDK I came across a lot of strange behaviour in NSURLConnection when receiving data from the server. We tracked it down to the fact that NSURLConnection doesn't deal well with responses in chunked-encoding. Or at least so we read in this question here NSURLConnection and "chunked" transfer-coding Some developers we were talking to say it gets better in iOS 5, we need to make sure that our

iOS Development: Why do I always get the “A connection failure occurred” on the 1st attempt, but success on the next?

孤街醉人 提交于 2019-11-28 22:09:11
问题 I'm using the ASIHTTPRequest lib in my iOS app to make RESTful requests to my Rails 3 web app. I seeing a weird and somewhat consistent error the 1st time I try to make a POST request to my web app, but then the POST request works fine the on the second attempt. The exact error is... Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0xb513740 {NSUnderlyingError=0xb5135a0 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1005.)",

iphone: upload image to server using ASIFormDataRequest

假如想象 提交于 2019-11-28 19:54:48
I have to upload an image to server for which I wrote code using NSMutableURLRequest like this NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; [request addValue:contentType forHTTPHeaderField: @"Content-Type"]; // // /* // now lets create the body of the post // */ NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:

iOS 5 : https ( ASIHTTPRequest) stop working

时光怂恿深爱的人放手 提交于 2019-11-28 19:50:54
I got an app which use ASIHTTPRequest . I recompiled my app with iOS 5 (sdk : 5.0 / xcode: 4.2 Build 4D199 ) and the https connections fail with error message (the same call with https disabled works fine): Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0xa8e66e0 {NSUnderlyingError=0xa8ac6c0 "The operation couldn’t be completed. (OSStatus error -9844.)", NSLocalizedDescription=A connection failure occurred} With debug log enabled: [STATUS] Starting asynchronous request <ASIFormDataRequest: 0xd96fc00> [CONNECTION] Request <ASIFormDataRequest: 0xd96fc00>

ASIHTTPRequest fails in production builds

自古美人都是妖i 提交于 2019-11-28 18:58:57
So i've run into quite a problem. It seems that ASIHTTPRequest just does not want to work in a production build. Everything works great in debug. However, once I build for production the following code just doesn't want to run. It doesn't hit either block complete nor failed. I have also tried using selectors, with a delegate but those do not get called either. __block __weak ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:URL]; [self performSelectorOnMainThread:@selector(startSpinner) withObject:nil waitUntilDone:NO]; [request setCompletionBlock:^{ [self performSelectorOnMainThread:

How? UITableViewCell with UIImageView asynchronously loaded via ASINetworkQueue

爷,独闯天下 提交于 2019-11-28 17:40:24
I'm trying to load some images in table cells asynchronously using ASINetworkQueue . I just can't figure it out and can't seem to find a good SIMPLE example. The best I can find is this, but its just totally overkill and a little too complicated for me: http://kosmaczewski.net/2009/03/08/asynchronous-loading-of-images-in-a-uitableview/ Does anyone else have any tips/solutions/code for doing this with the ASIHTTPRequest library? Here's a class derived from UIImageView which I use, perhaps this will help you. (Actually I've simplified this a fair bit from what I use, but that was what you asked

ASIHTTPRequest - HTTPS

别等时光非礼了梦想. 提交于 2019-11-28 17:20:21
Does ASIHTTPRequest support HTTPS connections? My connection right now works for a HTTP connection and errors if I try a HTTPS Connection. (Goes into requestFailed and gives me a ASIHTTPErrorRequestDomain) -(void) getData { av.hidden = NO; [av startAnimating]; NSString *urlString = [IP stringByAppendingString:@"Method1"]; NSURL *url = [NSURL URLWithString:urlString]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; NSLog(@"URL = %@",url); [request setRequestMethod:@"POST"]; [request setPostValue:@"val1" forKey:@"key1"]; [request setPostValue:@"val2" forKey:@"key2"];

ASIHTTPRequest vs AFNetworking framework

谁都会走 提交于 2019-11-28 16:23:21
I am about to develop an application for iPad and it has enormous amount of background thread network calls. I would like to know which one will be better? ASIHTTPRequest still works but not maintained. However few sources says AFNetworking framework creates lots of complications. Update (September 2013) It's been nearly two years since I originally wrote this answer, and quite a lot has changed. AFNetworking is about to go into version 2.0 and has a thriving developer community, whereas ASIHTTPRequest is pretty much dead. Additionally, AFNetworking has dozens of great helper libraries and