• 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: urlFromString creating bad URLs with string containing []
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: urlFromString creating bad URLs with string containing []


  • Subject: Re: urlFromString creating bad URLs with string containing []
  • From: Mike Abdullah <email@hidden>
  • Date: Fri, 14 Oct 2011 09:25:26 +0100

Probably only moderately better, since at best you're saving spinning up a thread.

Most important is that NSURLConnection is cancellable, and has delegate methods you can implement for more control.

On 12 Oct 2011, at 20:21, Martin Linklater wrote:

> Thanks Mike,
>
> At the moment I'm using [NSData +dataWithContentsOfURL] running in its own GCD dispatch queue. How much better performance should I expect to get using NSURLConnection ?
>
> I'll need to weigh up the benefits before I go refactoring the server code.
>
> Cheers.
>
> On 7 Oct 2011, at 15:04, Mike Abdullah wrote:
>
>>
>> On 7 Oct 2011, at 12:45, Martin Linklater wrote:
>>
>>> Hi - I'm writing an iOS client for an online retailer and I'm having trouble with the way NSURL encodes square brackets. I'm building an http request using a string then converting it to a NSURL before calling [NSData dataWithContentsOfURL].
>>
>> Aside from the URL problem you're having, do NOT use +dataWithContentsOfURL: for this. Use a proper NSURLConnection so you can run it asynchronously without having to fire up a thread.
>>
>

_______________________________________________

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: 
 >urlFromString creating bad URLs with string containing [] (From: Martin Linklater <email@hidden>)
 >Re: urlFromString creating bad URLs with string containing [] (From: Mike Abdullah <email@hidden>)
 >Re: urlFromString creating bad URLs with string containing [] (From: Martin Linklater <email@hidden>)

  • Prev by Date: Re: Namespace clash problem
  • Next by Date: Re: Reusing XCode 4 Core Data Model.
  • Previous by thread: Re: urlFromString creating bad URLs with string containing []
  • Next by thread: Question in regards to UITabBarController
  • Index(es):
    • Date
    • Thread