/URLRequestBuilder-3.swift Secret
Last active
March 26, 2019 11:42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class APIClient { | |
// Rest of code | |
func buildURLRequest<T: APIRequest>(for request: T) throws -> URLRequest { | |
return try URLRequestBuilder(with: request.baseURL, path: request.path) | |
.set(method: request.method) | |
.set(headers: request.headers) | |
.set(parameters: request.parameters) | |
.build() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment