Skip navigation.
 
ml[Cocoa] Subclassing NSMutableURLRequest
FROM : Alexander von Below
DATE : Mon Jun 30 22:05:31 2008

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

Related mailsAuthorDate
No related mails found.