iOS-NSURLProtocol的理解与应用
来源:互联网 发布:淘宝电子商务模式 编辑:程序博客网 时间:2024/06/07 07:12
NSURLProtocol官方文档的理解
官方提供的实例与方法如下:
- (instancetype)initWithRequest:(NSURLRequest *)request cachedResponse:(nullable NSCachedURLResponse *)cachedResponse client:(nullable id <NSURLProtocolClient>)client NS_DESIGNATED_INITIALIZER;@property (nullable, readonly, retain) id <NSURLProtocolClient> client;@property (readonly, copy) NSURLRequest *request;@property (nullable, readonly, copy) NSCachedURLResponse *cachedResponse;/*====================================================================== Begin responsibilities for protocol implementors The methods between this set of begin-end markers must be implemented in order to create a working protocol. ======================================================================*/+ (BOOL)canInitWithRequest:(NSURLRequest *)request;+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request;+ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b;- (void)startLoading;- (void)stopLoading;/*====================================================================== End responsibilities for protocol implementors ======================================================================*/+ (nullable id)propertyForKey:(NSString *)key inRequest:(NSURLRequest *)request;+ (void)setProperty:(id)value forKey:(NSString *)key inRequest:(NSMutableURLRequest *)request;+ (void)removePropertyForKey:(NSString *)key inRequest:(NSMutableURLRequest *)request;+ (BOOL)registerClass:(Class)protocolClass;+ (void)unregisterClass:(Class)protocolClass;
阅读全文
0 0
- iOS-NSURLProtocol的理解与应用
- IOS混合编程 - NSURLProtocol 的使用 (三)
- iOS开发之NSURLProtocol的那些坑
- iOS-NSURLRequest的理解与应用
- nsurlprotocol的理解和使用, 含demo, nice!
- iOS开发之--- NSURLProtocol
- iOS开发之--- NSURLProtocol
- iOS开发之--- NSURLProtocol
- iOS开发之--- NSURLProtocol
- iOS开发之--- NSURLProtocol
- iOS开发之--- NSURLProtocol
- iOS中的NSURLProtocol
- iOS中的NSURLProtocol
- IOS NSInvocation应用与理解
- IOS NSInvocation应用与理解
- IOS NSInvocation应用与理解
- iOS NSInvocation应用与理解
- NSURLProtocol与NSURLProtocolClient简介
- 24 WebGL从指定视点观察旋转后的三角形
- JAVA数字千分位和小数点的现实(处理金额问题)
- 学习A-level的4个误区 你掉坑里没
- lscpu命令详解
- IOS推送详解(一)------APNs
- iOS-NSURLProtocol的理解与应用
- 梯度下降法
- MySQL集群搭建(CentOs6)
- pandas.read_csv参数详解
- java小程序:将十进制数用二进制表示出来
- 使用laravel 的artisan快速创建表
- 课堂笔记六月一日
- Spring注解知识
- fcntl更改阻塞与非阻塞模式&读取鼠标键盘值