Skip to content

Commit

Permalink
Rename validateResponse() to validate()
Browse files Browse the repository at this point in the history
  • Loading branch information
sharplet committed Dec 27, 2016
1 parent f8c0390 commit 8b16af5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Models/APIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extension APIClient: Client {
public func perform<T: Request>(_ request: T, completionHandler: @escaping (Result<T.ResponseObject, SwishError>) -> Void) -> URLSessionDataTask {
return requestPerformer.perform(request.build()) { [schedule = scheduler] result in
let object = result
>>- self.validateResponse
>>- self.validate
>>- self.deserializer.deserialize
>>- T.ResponseParser.parse
>>- request.parse
Expand All @@ -30,7 +30,7 @@ extension APIClient: Client {
}

private extension APIClient {
func validateResponse(_ httpResponse: HTTPResponse) -> Result<Data?, SwishError> {
func validate(_ httpResponse: HTTPResponse) -> Result<Data?, SwishError> {
switch httpResponse.code {
case (200...299):
return .success(httpResponse.data)
Expand Down

0 comments on commit 8b16af5

Please sign in to comment.