iphone - Why is there no NSHTTPURLProtocol class? -
OK, NSURLProtocol is a very common right? This is to define all types of protocols, right? So why is nothing like NSHTTPURLProtocol ? Instead, there is an informal category on NSURLRequest with specific HTTP content why do they do this? Why not have any custom HTTP protocols instead? What is the idea behind putting all these things in NSURLRequest instead of a custom protocol for HTTP? Of course, HTTP is often used, but anyway: it is misleading to understand the cocoa / cocoachoch entire URL loading system. Now there are two documents, one says, "Create a custom NSURLProtocol subclass for your custom protocol". The second says: "Create informal categories like HTTP stuff for HTTP stuff at" NSURLRequest ". There is hope that someone with a deep understanding can make clear;) These are for many good reasons: You never have access to NSURLProtocol , which is giving power to the connection; Only the NSURL connection / object itsel...