• 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: Question about NSURLRequest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about NSURLRequest


  • Subject: Re: Question about NSURLRequest
  • From: tiennou <email@hidden>
  • Date: Thu, 4 Oct 2007 18:44:05 +0200


Le 4 oct. 07 à 18:13, Nick Zitzmann a écrit :


On Oct 4, 2007, at 9:20 AM, tiennou wrote:

Also I guess it could be better to handle specific protocols by subclassing from NSURLRequest ?

I can't think of any good reason to subclass NS(Mutable)URLRequest. If you want to add a new protocol, then you need to subclass NSURLProtocol.

Sorry I made myself unclear ;-).
I'm subclassing NSURLProtocol to handle this, and I access protocol- specific options of an 'incoming' request by calling [NSURLProtocol propertyForKey:LDAPSimpleBindProperty inRequest:[self request]] (this one to allow the use to choose between SASL and simple bind). As I'm developing this thinking about how I'll use my LDAP classes, I'll need to create an NSMutableURLRequest, since I'll need to call [theRequest setValue:[NSNumber numberWithBool:YES] forLDAPOption:LDAPSimpleBindProperty] on it.


It think it would feel better with NSURLRequest having only protocol- specific subclasses (as NSHTTPURLRequest), not just a mutable subclass...

Or maybe I'm doing something wrong ;-)

Etienne Samson_______________________________________________

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: 
 >Question about NSURLRequest (From: tiennou <email@hidden>)
 >Re: Question about NSURLRequest (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Convert NSOpenGLView pixel coordinates to OpenGL world coordinates
  • Next by Date: Re: Convert NSOpenGLView pixel coordinates to OpenGL world coordinates
  • Previous by thread: Re: Question about NSURLRequest
  • Next by thread: Convert NSOpenGLView pixel coordinates to OpenGL world coordinates
  • Index(es):
    • Date
    • Thread