Update Alamofire to 4.2.0 with new version of Xcode 8.1

This commit is contained in:
Vicent Tsai
2016-12-11 17:17:36 +08:00
parent 23967eca20
commit 4dd3bd495e
37 changed files with 1192 additions and 769 deletions

View File

@ -38,13 +38,17 @@ public struct DefaultDataResponse {
/// The error encountered while executing or validating the request.
public let error: Error?
/// The timeline of the complete lifecycle of the request.
public let timeline: Timeline
var _metrics: AnyObject?
init(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) {
init(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?, timeline: Timeline = Timeline()) {
self.request = request
self.response = response
self.data = data
self.error = error
self.timeline = timeline
}
}
@ -64,7 +68,7 @@ public struct DataResponse<Value> {
/// The result of response serialization.
public let result: Result<Value>
/// The timeline of the complete lifecycle of the `Request`.
/// The timeline of the complete lifecycle of the request.
public let timeline: Timeline
var _metrics: AnyObject?
@ -139,6 +143,9 @@ public struct DefaultDownloadResponse {
/// The error encountered while executing or validating the request.
public let error: Error?
/// The timeline of the complete lifecycle of the request.
public let timeline: Timeline
var _metrics: AnyObject?
init(
@ -147,7 +154,8 @@ public struct DefaultDownloadResponse {
temporaryURL: URL?,
destinationURL: URL?,
resumeData: Data?,
error: Error?)
error: Error?,
timeline: Timeline = Timeline())
{
self.request = request
self.response = response
@ -155,6 +163,7 @@ public struct DefaultDownloadResponse {
self.destinationURL = destinationURL
self.resumeData = resumeData
self.error = error
self.timeline = timeline
}
}