// 注册实现的子类open class func registerClass(_ protocolClass: Swift.AnyClass) -> Bool// 移除注册的实现子类open class func unregisterClass(_ protocolClass: Swift.AnyClass)
3 Determining If a Subclass Can Handle a Request
// 是否拦截该请求,并处理open class func canInit(with request: URLRequest) -> Bool
4 Getting and Setting Request Properties
// 通过属性key获取值open class func property(forKey key: String, in request: URLRequest) -> Any?// 动态添加属性可以和对应的值 open class func setProperty(_ value: Any, forKey key: String, in request: NSMutableURLRequest)// 移除属性key和对应的值open class func removeProperty(forKey key: String, in request: NSMutableURLRequest)
5 Providing a Canonical Version of a Request
// 将拦截的请求转换为另一个请求处理open class func canonicalRequest(for request: URLRequest) -> URLRequest
6 Determining If Requests Are Cache Equivalent
// 验证两个请求是否使用同样的缓存open class func requestIsCacheEquivalent(_ a: URLRequest, to b: URLRequest) -> Bool
// 数据加载器open var client: URLProtocolClient? { get }// 发出的请求open var request: URLRequest { get }// 缓存数据@NSCopying open var cachedResponse: CachedURLResponse? { get }