iOS-NSURLRequest的理解与应用
来源:互联网 发布:pkpm节能计算软件 编辑:程序博客网 时间:2024/06/03 21:20
NSURLRequest官方文档
@interface NSURLRequest : NSObject <NSSecureCoding, NSCopying, NSMutableCopying>{ @private NSURLRequestInternal *_internal;}+ (instancetype)requestWithURL:(NSURL *)URL;#if FOUNDATION_SWIFT_SDK_EPOCH_AT_LEAST(8)@property (class, readonly) BOOL supportsSecureCoding;#endif+ (instancetype)requestWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval;- (instancetype)initWithURL:(NSURL *)URL;- (instancetype)initWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval NS_DESIGNATED_INITIALIZER;@property (nullable, readonly, copy) NSURL *URL;@property (readonly) NSURLRequestCachePolicy cachePolicy;@property (readonly) NSTimeInterval timeoutInterval;@property (nullable, readonly, copy) NSURL *mainDocumentURL;@property (readonly) NSURLRequestNetworkServiceType networkServiceType NS_AVAILABLE(10_7, 4_0);@property (readonly) BOOL allowsCellularAccess NS_AVAILABLE(10_8, 6_0);@end@interface NSMutableURLRequest : NSURLRequest@property (nullable, copy) NSURL *URL;@property NSURLRequestCachePolicy cachePolicy;@property NSTimeInterval timeoutInterval;@property (nullable, copy) NSURL *mainDocumentURL;@property NSURLRequestNetworkServiceType networkServiceType NS_AVAILABLE(10_7, 4_0);@property BOOL allowsCellularAccess NS_AVAILABLE(10_8, 6_0);@end@interface NSURLRequest (NSHTTPURLRequest) @property (nullable, readonly, copy) NSString *HTTPMethod;@property (nullable, readonly, copy) NSDictionary<NSString *, NSString *> *allHTTPHeaderFields;- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;@property (nullable, readonly, copy) NSData *HTTPBody;@property (nullable, readonly, retain) NSInputStream *HTTPBodyStream;@property (readonly) BOOL HTTPShouldHandleCookies;@property (readonly) BOOL HTTPShouldUsePipelining NS_AVAILABLE(10_7, 4_0);@end@interface NSMutableURLRequest (NSMutableHTTPURLRequest) @property (copy) NSString *HTTPMethod;@property (nullable, copy) NSDictionary<NSString *, NSString *> *allHTTPHeaderFields;- (void)setValue:(nullable NSString *)value forHTTPHeaderField:(NSString *)field;- (void)addValue:(NSString *)value forHTTPHeaderField:(NSString *)field;@property (nullable, copy) NSData *HTTPBody;@property (nullable, retain) NSInputStream *HTTPBodyStream;@property BOOL HTTPShouldHandleCookies;@property BOOL HTTPShouldUsePipelining NS_AVAILABLE(10_7, 4_0);@end
阅读全文
0 0
- iOS-NSURLRequest的理解与应用
- iOS的NSURLRequest类
- iOS-NSURLProtocol的理解与应用
- iOS开发中对于NSURLRequest的封装
- iOS --- NSURLRequest 和 NSURLConnection 的网络操作
- iOS开发中NSURLRequest cookie的操作
- iOS开发中对于NSURLRequest的封装
- IOS NSInvocation应用与理解
- IOS NSInvocation应用与理解
- IOS NSInvocation应用与理解
- iOS NSInvocation应用与理解
- ios 加载本地文件NSURLRequest
- IOS中简单的KVO概念理解与应用
- IOS中简单的KVC概念理解与应用
- iOS开发中@selector的理解与应用
- iOS开发中@selector的理解与应用
- 【iOS开发】 UITableView 理解与应用
- 【iOS开发】 多线程理解与应用
- UNIX再学习 -- 进程间通信之管道
- linux---ifconfig&ip
- I2C子系统驱动框架及应用
- android检查系统方法是否正确
- QString中文乱码
- iOS-NSURLRequest的理解与应用
- Could not find the AndroidManifest.xml file,...found usingdummy file [file:///home/malachi/work/Anno
- 蓝桥-BASIC-17-矩阵乘法
- 【四】软考—计算机网络
- 离职了
- 人称代名词
- python007 -- 操作符与流程控制
- 【九度OJ】题目1262:Sequence Construction puzzles(I)_构造全递增序列
- 自定义Qt插件