• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLRequest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLRequest


  • Subject: Re: NSURLRequest
  • From: Michael Dautermann <email@hidden>
  • Date: Sat, 10 Oct 2009 07:46:04 -0700


On Oct 10, 2009, at 7:36 AM, 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?

if it's working well for you, why make things more complicated than necessary. ;-)


NSURLRequest allows you to set and or get extra detail out of a URL, but for stuff like loading an array with a simple URL on a remote server, what you're doing should suffice.

Just make sure myArray isn't null before you do any stuff on it.


_______________________________________________

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


References: 
 >NSURLRequest (From: DKJ <email@hidden>)

  • Prev by Date: real verses Virtual memory
  • Next by Date: Re: NSURLRequest
  • Previous by thread: NSURLRequest
  • Next by thread: Re: NSURLRequest
  • Index(es):
    • Date
    • Thread