apple / apple/swift-http-api-proposal
[HTTPAPIs] Non-restartable HTTP client body representation
- Dominant language
- Swift
- Stars
- 66
- Forks
- 21
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 2
Description
Some HTTP request bodies are naturally non-restartable. There's a discussion about _how to represent that_ on the client body type, and whether HTTP client implementations should be allowed to inspect that information upfront, without having to call the closure again.
One thing to consider in this discussion - bridging from existing AsyncSequences, which mostly aren't restartable, and how to safely bridge them to AsyncReader without crashing on redirects/restarts (since `AsyncSequence.makeAsyncIterator()` is non-throwing, so we can't gracefully throw an error).
Previous discussion on a PR: https://github.com/apple/swift-http-api-proposal/pull/12#discussion_r2585919457
Contributor guide
Assessment
This issue has not been assessed yet.