Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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