Reputation: 205
What is the difference between NSUrlConnection
and NSMutableUrlConnection
?
Upvotes: 0
Views: 2109
Reputation: 22305
As with all Mutable
classes, NSMutableURLRequest
can be changed.
If you look at the instance methods in the NSURLRequest
class reference you see things like initWithURL
and initWithURL:cachePolicy:timeoutInterval:
. You can initialize them, but there are no methods for changing them.
Compare that to the instance methods in the NSMutableURLRequest
class reference: setURL:
and setHTTPMethod
and such. The mutable version allows you to change things as needed.
Same thing with NSString
and NSMutableString
, NSArray
and NSMutableArray
, NSDictionary
and NSMutableDictionary
: the mutable ones can be changed after initialization.
Upvotes: 7