Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
09b7fdb
[WIP] Adopt swift-http-types
czechboy0 Sep 4, 2023
85aa75f
Try streaming
czechboy0 Sep 4, 2023
2eb8cf2
Add more streaming examples
czechboy0 Sep 4, 2023
5cd2a8b
petstore consumer tests working again
czechboy0 Sep 5, 2023
7996f90
Add a streaming example
czechboy0 Sep 5, 2023
d0436f1
Add a server streaming example
czechboy0 Sep 5, 2023
463fd73
Add another server streaming example that uses the unfolding initiali…
czechboy0 Sep 5, 2023
25ebc93
Use Swift overloads directly
czechboy0 Sep 5, 2023
531e1e6
WIP
czechboy0 Sep 6, 2023
3e4ee23
Fix tests up
czechboy0 Sep 6, 2023
c45e971
Updates
czechboy0 Sep 7, 2023
d3737e0
Represent no responses as a nil HTTPBody in server transport and midd…
czechboy0 Sep 8, 2023
dc32180
Use the renamed method
czechboy0 Sep 9, 2023
fa5926f
Fixes
czechboy0 Sep 9, 2023
31545a1
Feedback: further cleanup of the HTTPBody API
czechboy0 Sep 12, 2023
d52e465
Remove unnecessary initializers
czechboy0 Sep 12, 2023
42596c2
Review feedback: make response body optional
czechboy0 Sep 13, 2023
f508302
Merge branch 'main' into hd-adopt-http-types
czechboy0 Sep 18, 2023
1e57593
Merge branch 'main' into hd-adopt-http-types
czechboy0 Sep 18, 2023
6b195be
WIP
czechboy0 Sep 25, 2023
66eb9ce
Merge remote-tracking branch 'apple/main' into hd-adopt-http-types
czechboy0 Sep 25, 2023
95141bb
WIP
czechboy0 Sep 25, 2023
0b766a4
Merge branch 'main' into hd-adopt-http-types
czechboy0 Sep 25, 2023
f201d81
Use HTTP code and range names from swift-http-types
czechboy0 Sep 26, 2023
916b77f
Merge branch 'main' into hd-sync-http-names
czechboy0 Oct 2, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ struct HTTPStatusCodes {
return "`continue`"
case 101:
return "switchingProtocols"
case 102:
return "processing"
case 103:
return "earlyHints"
case 200:
return "ok"
case 201:
Expand All @@ -39,12 +39,6 @@ struct HTTPStatusCodes {
return "resetContent"
case 206:
return "partialContent"
case 207:
return "multiStatus"
case 208:
return "alreadyReported"
case 226:
return "imUsed"
case 300:
return "multipleChoices"
case 301:
Expand All @@ -55,8 +49,6 @@ struct HTTPStatusCodes {
return "seeOther"
case 304:
return "notModified"
case 305:
return "useProxy"
case 307:
return "temporaryRedirect"
case 308:
Expand All @@ -65,8 +57,6 @@ struct HTTPStatusCodes {
return "badRequest"
case 401:
return "unauthorized"
case 402:
return "paymentRequired"
case 403:
return "forbidden"
case 404:
Expand All @@ -88,7 +78,7 @@ struct HTTPStatusCodes {
case 412:
return "preconditionFailed"
case 413:
return "payloadTooLarge"
return "contentTooLarge"
case 414:
return "uriTooLong"
case 415:
Expand All @@ -97,16 +87,12 @@ struct HTTPStatusCodes {
return "rangeNotSatisfiable"
case 417:
return "expectationFailed"
case 418:
return "imATeapot"
case 421:
return "misdirectedRequest"
case 422:
return "unprocessableEntity"
case 423:
return "locked"
case 424:
return "failedDependency"
return "unprocessableContent"
case 425:
return "tooEarly"
case 426:
return "upgradeRequired"
case 428:
Expand All @@ -129,14 +115,6 @@ struct HTTPStatusCodes {
return "gatewayTimeout"
case 505:
return "httpVersionNotSupported"
case 506:
return "variantAlsoNegotiates"
case 507:
return "insufficientStorage"
case 508:
return "loopDetected"
case 510:
return "notExtended"
case 511:
return "networkAuthenticationRequired"
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum ResponseKind {
/// Successful responses.
case _2XX

/// Redirect responses.
/// Redirection responses.
case _3XX

/// Client error responses.
Expand Down Expand Up @@ -101,11 +101,11 @@ enum ResponseKind {
var prettyName: String {
switch self {
case ._1XX:
return "information"
return "informational"
case ._2XX:
return "success"
return "successful"
case ._3XX:
return "redirect"
return "redirection"
case ._4XX:
return "clientError"
case ._5XX:
Expand Down