asihttprequest

ASIHTTPRequest request times out

喜夏-厌秋 提交于 2019-12-01 04:30:43
问题 I have been working on this issue for a long time, and I am unsure how to proceed trying to solve it. I have a simple ASIHTTPRequest. The code is posted below. The app always works when I first run it. I have a table view which I can pull to refresh, which initiates the ASIHTTPRequest, and I can refresh as many times as I like with out problem. I can send the app to the background and bring it back and everything works fine. But if I leave the app for a number of hours and come back,

ASIHTTPRequest vs NSURLConnection

跟風遠走 提交于 2019-12-01 00:40:13
问题 Just wondering which is faster in terms of performance and usability? Or if there's anything better out there? 回答1: There's some performance information relating to an old version here: http://allseeing-i.com/ASIHTTPRequest-1.5 It's pretty comparable. I'm not sure if there are any figures for more recent versions. Note that the most recent ASIHTTPRequest has built in support for caching (which NSURLConnection doesn't) - if you enable that and it's applicable for your use it gets you a major

About download file using ASIHttpRequest

拟墨画扇 提交于 2019-11-30 15:41:46
I plan to use ASIHttpRequest for downloading files from back-end server. Before actions, post questions here to know more about this feature. As sample source codes given : ( demonstrate downloading remote JPG file ) ASIHTTPRequest *request; request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/images/small-image.jpg"]]; [request setDownloadDestinationPath:[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@"1.png"]]; [request setDownloadProgressDelegate:imageProgressIndicator1]; [networkQueue

Multiple Requests on ASIHTTPRequest

半城伤御伤魂 提交于 2019-11-30 15:26:49
问题 I need to download three different sets of data from three different URLs. I decided to use ASIHTTPRequest. Two of the URLs are JSON feeds which I need to parse and one of them is a .txt file online that I need to store locally. Now the example that is on ASIHTTPRequest's website for an asynchronous request shows the following: - (IBAction)grabURLInBackground:(id)sender { NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url

Is it safe to still use ASIHTTPRequest?

こ雲淡風輕ζ 提交于 2019-11-30 14:32:57
Ben Copsey has abandoned ASIHTTPRequest. It has been announced almost two months ago but I just realized it. I'm in the middle of a project using it. It wouldn't be an huge problem for me to replace it with something else at this stage (everyone is talking about AFNetworking right now), but: If I can avoid replacing it it's better. I'd rather spend that time working on other things I'd like to support iOS < 4, but AFNetworking and LRResty are 4> only I also have a few other apps that heavily depend on it I'm pretty sure other folks are in my situation. So my question is: is it safe to continue

Multiple Requests on ASIHTTPRequest

泄露秘密 提交于 2019-11-30 14:21:20
I need to download three different sets of data from three different URLs. I decided to use ASIHTTPRequest. Two of the URLs are JSON feeds which I need to parse and one of them is a .txt file online that I need to store locally. Now the example that is on ASIHTTPRequest's website for an asynchronous request shows the following: - (IBAction)grabURLInBackground:(id)sender { NSURL *url = [NSURL URLWithString:@"http://allseeing-i.com"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDelegate:self]; [request startAsynchronous]; } To pass multiple URLs, I can call

Uploading images to server using ASIHTTPRequest in iphone

狂风中的少年 提交于 2019-11-30 07:47:59
问题 I have to upload images to server form iphone I am using ASIHTTPRequest for this. I have set a loop for uploading seven files. But after the executing only last file is uploaded can some one point out where I am getting it wrong. I am using the below code for uploading : for (int i=1; i<8; i++) { NSString* filename = [NSString stringWithFormat:@"Photo%d.jpg", i]; NSString *path = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:filename];

iPhone app, running http requests while application in background

筅森魡賤 提交于 2019-11-30 07:42:51
问题 In my iPhone app I would like to run several queries when the application is in background. I already use ASIHttpRequest to make the queries, that works fine but now I try to find a way to trigger them in background. In the app delegate, I have added a call to the method making the request: [self getItemsFromServer] getItemsFromServer runs an asynchronous request (on the simulator I saw the log of this methods once I get back the application to the foreground). How can I use some kind of

iOS 5 : https ( ASIHTTPRequest) stop working

扶醉桌前 提交于 2019-11-30 06:32:38
问题 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

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

我怕爱的太早我们不能终老 提交于 2019-11-30 05:05:08
I've seen a couple of times people using ASIHTTPRequest to download files. Now I wonder why? What are the core benefits over NSURLConnection? sergio 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 very easy to make your app working when offline (and showing the cached data); no such mechanism in