Showing posts with label asihttprequest. Show all posts
Showing posts with label asihttprequest. Show all posts

Monday, April 16, 2012

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?

Sunday, March 11, 2012

Asihttprequest 61 errors [closed]


it should be a simple problem. im using the ASIhttprequest in many project but sins 1 week each new project i'm trying to add the ASIhttprequest classes i got the following 61 error before using classes just when i'm trying to import them.

Thursday, March 1, 2012

returning UIImage from block


I have the following code:




- (UIImage *) getPublisherLogo
{
//check the cache if the logo already exists
NSString * imageUrl = [NSString stringWithFormat:@"%@/%@&image_type=icon", self.baseUrl, self.imageUrl_];


ASIHTTPRequest * imageRequest = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:imageUrl]];
[imageRequest setTimeOutSeconds:30.0];
[imageRequest setDownloadCache:[ASIDownloadCache sharedCache]];
[imageRequest setCacheStoragePolicy:ASICachePermanentlyCacheStoragePolicy];
[imageRequest setCachePolicy:ASIAskServerIfModifiedWhenStaleCachePolicy|ASIFallbackToCacheIfLoadFailsCachePolicy];
[imageRequest setCompletionBlock:^(void){


UIImage *img = [UIImage imageWithData:[imageRequest responseData] ];
if (img){
return img;
}
}];

[imageRequest setFailedBlock:^(void){
NSLog(@"Error in pulling image for publisher %@", [[imageRequest error] userInfo]);
}];

[imageRequest startAsynchronous];
}
}

Friday, February 24, 2012

PHP - Saving Uploaded Image to Server


I am trying to save an uploaded image from an iPhone to a server using PHP. I am using ASIHTTPRequest to handle the data request. This is my iPhone code:

Tuesday, February 21, 2012

Friday, January 20, 2012

How safely cancel all requests in ASINetworkQueue on view deallocate


I have ASINetworkQueue with more than 1500 requests in it. Performing this number of requests takes for a while. If user leaves view controller while this queue is running the OS deallocates the view controller and I get "message sent to deallocated instance" error.