2018年12月28日

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

导航