1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| //下面两个方法用于对象的创建和初始化 都是通过字典进行键值设置 - (nullable instancetype)initWithProperties:(NSDictionary<NSString *, id> *)properties; + (nullable NSHTTPCookie *)cookieWithProperties:(NSDictionary<NSString *, id> *)properties; //返回Cookie数据中可用于添加HTTP头字段的字典 + (NSDictionary<NSString *, NSString *> *)requestHeaderFieldsWithCookies:(NSArray<NSHTTPCookie *> *)cookies; //从指定的响应头和URL地址中解析出Cookie数据 + (NSArray<NSHTTPCookie *> *)cookiesWithResponseHeaderFields:(NSDictionary<NSString *, NSString *> *)headerFields forURL:(NSURL *)URL; //Cookie数据中的属性字典 @property (nullable, readonly, copy) NSDictionary<NSString *, id> *properties; //请求响应的版本 @property (readonly) NSUInteger version; //请求相应的名称 @property (readonly, copy) NSString *name; //请求相应的值 @property (readonly, copy) NSString *value; //过期时间 @property (nullable, readonly, copy) NSDate *expiresDate; //请求的域名 @property (readonly, copy) NSString *domain; //请求的路径 @property (readonly, copy) NSString *path; //是否是安全传输 @property (readonly, getter=isSecure) BOOL secure; //是否只发送HTTP的服务 @property (readonly, getter=isHTTPOnly) BOOL HTTPOnly; //响应的文档 @property (nullable, readonly, copy) NSString *comment; //相应的文档URL @property (nullable, readonly, copy) NSURL *commentURL; //服务端口列表 @property (nullable, readonly, copy) NSArray<NSNumber *> *portList;
|