apple / apple/swift-http-api-proposal
[HTTPAPIs] Introduce a concrete type for the client `responseHandler`
Open
http-client
kind/enhancement
status/needs-design
- Dominant language
- Swift
- Stars
- 66
- Forks
- 21
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 2
Description
Right now the `responseHandler` is a two parameter closure in the client. While this works, we know from previous API designs that this might limit future evolution since we can't add new parameters to the closure without breaking API. We should introduce a new structure `HTTPClientResponseReceiver` similar to the `HTTPServerResponseSender`. This will allow us to add more properties to the response sender in the future.
Contributor guide
Assessment
This issue has not been assessed yet.