Re: NSURLRequest
Re: NSURLRequest
- Subject: Re: NSURLRequest
- From: Mike Abdullah <email@hidden>
- Date: Mon, 12 Oct 2009 01:18:35 +0100
On 10 Oct 2009, at 15:36, DKJ wrote:
I've got an NSArray that I initialise with data from a plist stored
on a remote webserver. I've been doing it like this:
NSURL *url = [NSURL URLWithString:@"http://www.server.com/
data.plist"];
NSArray *myArray = [NSArray arrayWithContentsOfURL:url];
which has been working just fine so far.
But now I'm reading through the "URL Loading System" docs, and
wondering if I should be using all the NSURLRequest stuff instead.
It's more complicated, so are there any advantages it would have
over what I'm doing now?
Advantages are:
- Asynchronous operation so you don't block the runloop
- More detailed error handling
- Better authentication support
- Finer control over the request, such as custom HTTP headers or
timeout length
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden