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

Support streaming body #176

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Support streaming body #176

merged 1 commit into from
Sep 14, 2023

Conversation

kornelski
Copy link
Contributor

Fixes #175

@lipanski lipanski merged commit 3b63970 into lipanski:master Sep 14, 2023
6 checks passed
@lipanski
Copy link
Owner

Thank you! 🥇

Released as 1.1.1

@kornelski kornelski deleted the stream branch September 14, 2023 14:48
@Daanoz
Copy link

Daanoz commented Sep 25, 2023

Leaving this here in case someone runs into the same issue as me. I was using (maybe abusing) with_chunked_body to simulate connection timeouts:

            .with_chunked_body(|w| {
                std::thread::sleep(std::time::Duration::from_millis(500));
                w.write_all(b"data")
            })

This no longer works due to this change, the connection is immediately accepted before even sending data. Changed it to with_body_from_request to have a similar behavior as before:

            .with_body_from_request(|_| {
                std::thread::sleep(std::time::Duration::from_millis(500));
                b"data".to_vec()
            })

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.

with_chunked_body does not support backpressure
3 participants