Skip to content

Commit

Permalink
Merge pull request #437 from KKuzmichev/stable
Browse files Browse the repository at this point in the history
Add only two cases.
  • Loading branch information
Vkt0r authored Sep 26, 2020
2 parents 73b7531 + 25e0bbb commit 6ed3e57
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion XCode/Sources/HttpResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public enum HttpResponse {
case ok(HttpResponseBody), created, accepted
case movedPermanently(String)
case movedTemporarily(String)
case badRequest(HttpResponseBody?), unauthorized, forbidden, notFound
case badRequest(HttpResponseBody?), unauthorized, forbidden, notFound, notAcceptable
case tooManyRequests
case internalServerError
case raw(Int, String, [String: String]?, ((HttpResponseBodyWriter) throws -> Void)? )

Expand All @@ -99,6 +100,8 @@ public enum HttpResponse {
case .unauthorized : return 401
case .forbidden : return 403
case .notFound : return 404
case .notAcceptable : return 406
case .tooManyRequests : return 429
case .internalServerError : return 500
case .raw(let code, _, _, _) : return code
}
Expand All @@ -116,6 +119,8 @@ public enum HttpResponse {
case .unauthorized : return "Unauthorized"
case .forbidden : return "Forbidden"
case .notFound : return "Not Found"
case .notAcceptable : return "Not Acceptable"
case .tooManyRequests : return "Too Many Requests"
case .internalServerError : return "Internal Server Error"
case .raw(_, let phrase, _, _) : return phrase
}
Expand Down

0 comments on commit 6ed3e57

Please sign in to comment.