apple / apple/swift-http-api-proposal

[HTTPAPIs] Introduce a concrete type for the client `responseHandler`

Open
#30 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.