asihttprequest

Adding NSOperation to NSOperationQueue that starts asynchronous ASIHTTPRequest

So I'm trying to do all my REST calls that download data on the background thread so that the UI stays responsive. I have a viewcontroller that contains a NSOperationQueue. I create an instance of my importer class that is a subclass of NSOperation. Inside the main() method of my importer, I am setting up a ASIHTTPDataRequest. I create ...

ASIHTTPRequest Download cache problem - unable to save/load date in cache

Hi guys, I am trying to save data into cache using ASIHTTP (http://allseeing-i.com/ASIHTTPRequest/How-to-use#using_a_download_cache). I am not sure what I am doing wrong but it seems not to be storing data into cache. The output of the following code is this: 2010-08-12 15:44:13.801 TabBar[51728:207] Success is YES 2010-08-12 15:44:13....

Generic approach to NSManagedObjectContext in multi-threaded application

I've read a number of posts here about NSManagedObjectContext and multi-threaded applications. I've also gone over the CoreDataBooks example to understand how separate threads require their own NSManagedObjectContext, and how a save operation gets merged with the main NSManagedObjectContext. I found the example to be good, but also too...

ASIHTTPRequest: Error out while trying to invoke my delegate method

I have a instance of ASINetworkQueue, and I added instances of ASIHTTPRequest to the queue; meanwhile I have delegate methods set for the Queue as well as each requests: [submittingReportQueue setDelegate:self]; [submittingReportQueue setRequestDidFailSelector:@selector(submitReportQueueWentWrong:)]; [submittingReportQueue setQueueDidFi...

Another Delegate for ASIHTTPRequest Asynchronous?

How can I create a new file containing just it's own delegate so that I can make an ASIHTTPRequest with its own asynchronous ending, and something easy enough where I just need to set [request setDelegate:self]; to something like [request setDelegate:AlternateDelegate]; and just add an include at the begining of the document to reference...

How do I send a delete request with ASIHTTPRequest?

Wondering how I can send a DELETE instead of POST/GET etc with ASIHTTPRequest. Thanks! ...

iPhone upload image speed advice

Hi there, I have an app that allows you to take a picture, adjust the jpeg quality size (10-100%) and then send it to a server using ASIFormDataRequest (part of the ASIHTTPRequest implementation). This works fine over a network connection, but over the celluar network it appears to sit there for 5-10 minutes attempting to transmit the i...

Download queue in iPhone

What's the best way to implement a download queue in iPhone? Can this be done with the ASIHTTPRequest library? ...

ASIHTTPRequest: Results are not populated at the right time when using an asynchronous request

Hello all, I've my own class which should do the request and the data processing (parsing). This class should be used from different view controllers. In this class I have implemented: - (void)sendRequest:(NSString *)url; - (void)requestFinished:(ASIHTTPRequest *)request; - (void)requestFailed:(ASIHTTPRequest *)request; - (id)parse:(NS...

Publish stream with FacebookGraph API using ASIHTTPRequest?

Can someone please explain to me how to create an ASIHTTPRequest object that can post a stream to facebook using the Graph API? The API call is: https://graph.facebook.com/me/feed?message=X&access_token=Y The method type is POST ...

asihttprequest: post problems on the iphone

I am trying to to establish a connection between my app and an internet service and I am using asihttprequest but I'm having a small problem. Everything works great when I am on WiFi but when I turn it off and use GPRS(EDGE) or 3G nothing seems to work. Should I change something. Here is some of my code [self setRequest:[ASIFormDataRequ...

Remove all requests from ASINetWorkQueue

Hi there. Does someone know a way to remove requests from an ASINetworkQueue in a persistent way? The reset function doesn't seem to do the job. What I'm trying to do is the following - (void)fillAndRunQueue:(ASINetworkQueue*)queue requests:(NSArray*)requests { for (ASIHTTPRequest* request in requests) { if ([reques...

ASIFormDataRequest Error

- (void) recordTransaction: (SKPaymentTransaction *) transaction { NSDictionary * receipt = [transaction.transactionReceipt dictionaryFromAppleResponse]; NSDictionary * purchaseInfo = [[NSData dataFromBase64String: [receipt objectForKey: @"purchase-info"]] dictionaryFromAppleResponse]; NSURL * url = [NSURL URLWithString: @"h...

ASIHTTPRequest Error

(void)getFacebookProfile { NSString *urlString = [NSString stringWithFormat:@"https://graph.facebook.com/me?access_token=%@", [_accessToken stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSURL *url = [NSURL URLWithString:urlString]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDidFinishSe...

ASIHTTPRequest Unable to create request (bad url?) Error

I keep getting: Unable to create request (bad url?) error message on a request like: - (void)grabURLInBackground :(id)sender { NSURL *url= [NSURL URLWithString:@"http://api.website.com/api_requests/standard_request/getItemRequest={\"Id\":\"Logic\"}"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request ...

ASIHTTPRequest: Basic Authentication with Base64 encoding?

Does ASIHTTPRequest uses Base64 encoding for username and password? On the webpage I only found out that the username/password is in plain text if SSL is not used. ...

ASIHTTPRequest: https with SSL

How to implement a https connection with SSL and ASIHTTPRequest? Are there some special steps to do? Can it be that this has nothing to do with ASIHTTPRequest? It has to do only with the server-side I think. Can someone post a link or describe the process of how a https connection can be established? This is what I found out so far: I ...

ASIHTTPRequest: keychainPersistence

ASIHTTPRequest can store the username/password in the Keychain. How does this work? 1) Is the built in authentication dialog (ASIAuthenticationDialog) coming up and stores the username/password only for the first time? When will the dialog be presented? 2) What about the next requests? Is always the same username/password used? 3) Wha...

ASIHTTPRequest: check if username/password is correct

How can I check a webservice if the username/password is correct? I don't want to transfer the whole response body. I only want to know if the username/password exists and is correct. Currently I'm sending a request to my webservice like this: self.request = [ASIHTTPRequest requestWithURL:urlObject]; [self.request setUsername:username]...

ASIHTTPRequest: when does ASIAuthenticationDialog appear?

When does the authentication dialog appear? If I didn't set the username/password in the request or URL? ...