[Cocoa] Subclassing NSMutableURLRequest
[Cocoa] Subclassing NSMutableURLRequest
- Subject: [Cocoa] Subclassing NSMutableURLRequest
- From: Alexander von Below <email@hidden>
- Date: Mon, 30 Jun 2008 22:05:31 +0200
Hello List,
I have searched the archives, but did not really find an answer to my
question, even though the title was the same...
I want to subclass NSMutableURLRequest, in order to create my own,
specialized URLRequest (namely, XML-RPC). I thought that was a smart
idea.
As NSURLRequest is deep-copied for transmission, I could overwrite
copyWithZone: , and create my custom body there on 10.4
On 10.5 however, copyWithZone: (or copyMutableWithZone:, for that
matter), is never called.
Using class_dump to take a peak at the class, I overwrote - (struct
_CFURLRequest *)_CFURLRequest, and all is well.
Now... is that a good idea? Or should I not subclass
NSMutableURLRequest at all?
Any hints or opinions are appreciated!
Alex
_______________________________________________
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