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

fix non-streaming outgoing POST requests in Rust SDK #2083

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

dicej
Copy link
Contributor

@dicej dicej commented Nov 10, 2023

This was my fault for over-simplifying the code in spin_sdk::http::send. I've added a test to make sure this stays fixed.

Fixed #2080

This was my fault for over-simplifying the code in `spin_sdk::http::send`.  I've
added a test to make sure this stays fixed.

Fixed spinframework#2080

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
@dicej dicej requested review from lann and rylev November 10, 2023 16:13
@dicej dicej enabled auto-merge (squash) November 10, 2023 16:19
@dicej dicej merged commit 40bbead into spinframework:main Nov 10, 2023
body_sink
.send(body_buffer)
.await
.map_err(|e| SendError::Http(Error::UnexpectedError(e.to_string())))?;
response
drop(body_sink);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should comment why the explicit drop is needed so we're not tempted in the future to remove it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Outgoing post requests send(Request::post(...)) do not work
3 participants