开发者

difference between NSUrlConnection and NSMutableUrlConnection

What is the difference between NSUrlConnection and 开发者_运维百科NSMutableUrlConnection?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜