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

[Proposal] SOAR-0005: Adopting the Swift HTTP Types package #255

Merged
merged 7 commits into from
Sep 26, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Review feedback: make response body optional
  • Loading branch information
czechboy0 committed Sep 13, 2023
commit 51dae70c50ad03435b9b75752e80f1282d39e9b9
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Adopt the new ecosystem-wide Swift HTTP Types package for HTTP currency types in
- Versions:
- v1 (2023-09-08): Initial version
- v1.1: In `ServerTransport` and `ServerMiddleware`, make the response `HTTPBody` optional to preserve the intent of the OpenAPI document author for the transport.
- v1.2 (2023-09-13): Made response bodies optional.

### Introduction

Expand Down Expand Up @@ -90,7 +91,7 @@ public protocol ClientTransport {
body: HTTPBody?, // <<< added
baseURL: URL,
operationID: String
) async throws -> (HTTPResponse, HTTPBody) // <<< changed
) async throws -> (HTTPResponse, HTTPBody?) // <<< changed
}
```

Expand Down Expand Up @@ -125,8 +126,8 @@ public protocol ClientMiddleware {
body: HTTPBody?, // <<< added
baseURL: URL,
operationID: String,
next: @Sendable (HTTPRequest, HTTPBody?, URL) async throws -> (HTTPResponse, HTTPBody) // <<< changed
) async throws -> (HTTPResponse, HTTPBody) // <<< changed
next: @Sendable (HTTPRequest, HTTPBody?, URL) async throws -> (HTTPResponse, HTTPBody?) // <<< changed
) async throws -> (HTTPResponse, HTTPBody?) // <<< changed
}
```

Expand Down