摘要:
时间顺序如上图:self.latency = initialResponseTime - requestStartTimeself.requestDuration = requestCompletedTime - requestStartTimeself.serializationDuration = serializationCompletedTime - requestCompletedTi... 阅读全文
摘要:
以DataRequest 为例子。 最简单的返回URLSession 有一个方法,可以构建 URLSessionDataTaskfunc dataTask(with url: URL, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTaskDataRequest 也提供了... 阅读全文
摘要:
AFError is the error type returned by Alamofire. It encompasses a few different types of errors, each with their own associated reasons.使用 AFError 来表示所有的网络错误,分为几大类,每一类又分几小类。AFError 是一个枚举类型!下面就是所有的枚举... 阅读全文