-
Notifications
You must be signed in to change notification settings - Fork 117
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
HTTPClientRequest looks & feels like a value type but isn't #708
Comments
Agree, same is true for the response. We should do it at the same time we adopt |
Indeed, |
Currently yes but not after your PR has landed. |
Oh really, what changes? |
Currently |
Cool, that seems to work either way. |
It doesn't scale well. Why is |
Right, there's still an API-design challenge but #709 doesn't change anything about it because it amends the to-be-deprecated |
Hi @dnadoba! Is this the issue that I should subscribe to for |
That’s the right issue to track :) |
Sadly
HTTPClientRequest
contains a streamable body which is typically a reference to a (frequently) consume-onceAsyncSequence
. That means it's not actually a value type.That's a major API winkle that should be fixed as soon as feasible.
My recommendation would be to separate the request and the body. Something like
try await httpClient.execute(request, body: myStream)
.The text was updated successfully, but these errors were encountered: