pixelbitlabs
pixelbitlabs

Reputation: 1934

How can I download files from UIWebView using ASIHTTPRequest?

I want to create a section of my app where you can download the current webpage showing in the UIWebView and then save it to a UITableView and when you tap on the filename in the UITableView, it will load the local file in the UIWebView to allow offline browsing.

How can I do this with http://allseeing-i.com/ASIHTTPRequest? I've taken a look and all the code looks very daunting for a beginner! Is there an alternative method? Is this the best method?

Thank you

Upvotes: 0

Views: 608

Answers (1)

Dan Ray
Dan Ray

Reputation: 21893

ASIWebPageRequest is the answer. It's a class included with ASIHTTPRequest that makes it easy to download whole pages, with all their associated dependencies.

You'd probably want to create a custom cache to store your downloaded webpages in, and then load them out of that cache when requested by the user.

Upvotes: 1

Related Questions