Skip to content

Instantly share code, notes, and snippets.

@bfernandesbfs
Created April 12, 2017 21:55
Show Gist options
  • Save bfernandesbfs/2827c578341e7e6436f7d42713628700 to your computer and use it in GitHub Desktop.
Save bfernandesbfs/2827c578341e7e6436f7d42713628700 to your computer and use it in GitHub Desktop.
public struct Response<Value> {
public let request: URLRequest?
public let response: HTTPURLResponse?
public let data: Data?
public let result: Result<Value>
public var error: Error? { return result.error }
public init(request: URLRequest?, response: HTTPURLResponse?, data: Data?, result: Result<Value>) {
self.request = request
self.response = response
self.data = data
self.result = result
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment