Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More status codes #67

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions FlyingFox/Sources/HTTPStatusCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ public extension HTTPStatusCode {
static let expectationFailed = HTTPStatusCode(417, phrase: "Expectation Failed")
static let teapot = HTTPStatusCode(418, phrase: "I'm a teapot")
static let misdirectedRequest = HTTPStatusCode(421, phrase: "Misdirected Request")
static let unprocessableContent = HTTPStatusCode(422, phrase: "Unprocessable Content")
static let locked = HTTPStatusCode(423, phrase: "Locked")
static let failedDependency = HTTPStatusCode(424, phrase: "Failed Dependency")
static let tooEarly = HTTPStatusCode(425, phrase: "Too Early")
static let upgradeRequired = HTTPStatusCode(426, phrase: "Upgrade Required")
static let preconditionRequired = HTTPStatusCode(428, phrase: "Precondition Required")
Expand Down
3 changes: 3 additions & 0 deletions FlyingFox/Tests/HTTPStatusCodeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ final class HTTPStatusCodeTests: XCTestCase {
XCTAssertEqual(HTTPStatusCode.expectationFailed, HTTPStatusCode(417, phrase: "Expectation Failed"))
XCTAssertEqual(HTTPStatusCode.teapot, HTTPStatusCode(418, phrase: "I'm a teapot"))
XCTAssertEqual(HTTPStatusCode.misdirectedRequest, HTTPStatusCode(421, phrase: "Misdirected Request"))
XCTAssertEqual(HTTPStatusCode.unprocessableContent, HTTPStatusCode(422, phrase: "Unprocessable Content"))
XCTAssertEqual(HTTPStatusCode.locked, HTTPStatusCode(423, phrase: "Locked"))
XCTAssertEqual(HTTPStatusCode.failedDependency, HTTPStatusCode(424, phrase: "Failed Dependency"))
XCTAssertEqual(HTTPStatusCode.tooEarly, HTTPStatusCode(425, phrase: "Too Early"))
XCTAssertEqual(HTTPStatusCode.upgradeRequired, HTTPStatusCode(426, phrase: "Upgrade Required"))
XCTAssertEqual(HTTPStatusCode.preconditionRequired, HTTPStatusCode(428, phrase: "Precondition Required"))
Expand Down
Loading