asihttprequest

ASIHTTPRequest; installation issues

六眼飞鱼酱① 提交于 2019-11-28 03:36:48
问题 I am trying to install ASIHTTPRequest and i am having issues with libxml/HTMLParser, xmlsave, xpath and xpathInternals are missing. I have already included the libxml2.2.7.3 framework and followed the guide on their website to the letter. any suggestions? 回答1: You note that you've followed the instructions to the letter, though I don't see libz.1.2.3.dylib in your post or in your comments. Are you certain you have libz.1.2.3? Note that it is not the same as libbz2 or libxml2. If you filter by

What major ASIHTTPRequest features is AFNetworking missing?

纵饮孤独 提交于 2019-11-28 02:39:55
With work having recently stopped on ASIHTTPRequest , it seems like attention is shifting to AFNetworking . However, I've not yet found a good comparison of the features of the two libraries, so I don't know what I might lose if/when I switch over. Major differences I've spotted so far are: AFNetworking has a much smaller code size (which is good) AFNetworking is being rapidly improved (so it may not yet be mature, may not have a stable API yet?) Both seem to have caching, though I've seen hints that because AFNetworking uses NSURLConnection it won't cache objects over 50K ASIHTTPRequest has

iphone pdf download

我们两清 提交于 2019-11-28 02:18:56
问题 -(IBAction)click; { NSURL *url = [NSURL URLWithString:URL_TO_DOWNLOAD]; NSString *tempDownloadPath = [[self documentsDirectory] stringByAppendingPathComponent:@"test.pdf"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDownloadDestinationPath:[self documentsDirectory]]; [request setTemporaryFileDownloadPath:tempDownloadPath]; [request setDelegate:self]; [request startAsynchronous]; } - (void)requestFinished:(ASIHTTPRequest *)request { NSLog(@"requestFinished");

AFNetworking : How to know if response is using cache or not ? 304 or 200

半腔热情 提交于 2019-11-27 19:47:59
I can't find any answer to my question, may be I miss something... When I ask for a url, I need to know if the response comes from the cache or from the net. Is the status code 304 or 200 ? (but AFNetworking always responde 200) With ASIHTTPRequest I used to check " didUseCachedResponse " from ASIHTTPRequest , this was perfect. Darrarski I think I found a solution to determine if response was returned from cache or not using AFNetworking 2.0. I found out that each time a new response is returned from the server (status 200, not 304) the cacheResponseBlock which is a property of

ASIHTTPRequest alternative

青春壹個敷衍的年華 提交于 2019-11-27 16:51:19
问题 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? 回答1: Here is the link to the topic where the author is giving some ASIHTTPRequest alternatives. List of them with links from topic:

What are alternatives to NSURLConnection for chunked transfer encoding

烂漫一生 提交于 2019-11-27 16:23:53
问题 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

Objective-C: Instance Variable in Category

被刻印的时光 ゝ 提交于 2019-11-27 13:17:03
I am just asking whether it was possible to add an instance variable via a category. My special problem is, that I need to add an NSIndexPath property to an ASIHTTPRequest object but I don't wanna subclass the ASIHTTPRequest as a matter of principle. Do I have any kind of alternative? Thanks for your answers, Christian albertamg A category can not declare additional instance variables but since OS X 10.6 and iOS 3.1 you can work around this with associative references . You can use associative references to simulate the addition of object instance variables to an existing class. Using

iphone: upload image to server using ASIFormDataRequest

坚强是说给别人听的谎言 提交于 2019-11-27 12:34:33
问题 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

ASIHTTPRequest vs AFNetworking framework

佐手、 提交于 2019-11-27 09:52:07
问题 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. 回答1: 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

AFNetworking - How to setup requests to be retried in the event of a timeout?

落爺英雄遲暮 提交于 2019-11-27 09:35:29
问题 I have recently migrated from ASIHTTPRequest to AFNetworking, which has been great. However, the server that I am connecting with has some issues and sometimes causes my requests to timeout. When using ASIHTTPRequest it was possible to setup a retry count on a request in the event of a timeout using the following selector -setNumberOfTimesToRetryOnTimeout: This can be further referenced in this post, Can an ASIHTTPRequest be retried? This is AFNetworking if you are unfamiliar https://github