Reputation:
Pardon me for this silly question but can anybody please tell me what is the difference between NSURLResponse and NSHTTPURLResponse
Upvotes: 0
Views: 1256
Reputation: 68596
"NSURLResponse declares the programmatic interface for an object that accesses the response returned by an NSURLRequest instance.
NSURLResponse encapsulates the metadata associated with a URL load in a manner independent of protocol and URL scheme.
An NSHTTPURLResponse object represents a response to an HTTP URL load request. It’s a subclass of NSURLResponse that provides methods for accessing information specific to HTTP protocol responses." *
*Quote taken from the official Apple Developer documentation.
Upvotes: 1
Reputation: 367
NSHTTPURLResponse - It returns, The receiver’s HTTP status code. NSURLResponse - It returns, The receiver’s URL.
For more details you can refer 1.https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLResponse_Class/Reference/Reference.html. 2.https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSHTTPURLResponse_Class/Reference/Reference.html
Upvotes: 0