RequestFilterProtocol
public protocol RequestFilterProtocol : AnyObject
请求过滤器协议
-
filterUrl(_:
Default implementationfor: ) 请求URL过滤器,返回处理后的URL
Default Implementation
默认实现请求URL过滤器,返回处理后的URL
Declaration
Swift
func filterUrl(_ originUrl: String, for request: HTTPRequest) -> String
-
filterUrlRequest(_:
Default implementationfor: ) 请求URLRequest过滤器,处理后才发送请求
Default Implementation
默认实现请求URLRequest过滤器,处理后才发送请求
Declaration
Swift
func filterUrlRequest(_ urlRequest: inout URLRequest, for request: HTTPRequest)
-
filterResponse(for:
Default implementation) 请求Response过滤器,处理后才调用回调
Default Implementation
默认实现请求Response过滤器,处理后才调用回调
Declaration
Swift
func filterResponse(for request: HTTPRequest) throws