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

Set body of Request #9

Closed
colelawrence opened this issue Mar 19, 2019 · 1 comment
Closed

Set body of Request #9

colelawrence opened this issue Mar 19, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@colelawrence
Copy link
Contributor

Hello, would it make sense to be able to set the RequestBuilder's body via a Request?
Currently, I only see the ability to send a body when using the RequestBuilder.

Perhaps even the ability to implement From<RequestBuilder> for Request would be nice.

Cheers,

Cole

colelawrence added a commit to colelawrence/http_req that referenced this issue Mar 19, 2019
@jayjamesjay jayjamesjay added the enhancement New feature or request label Mar 20, 2019
@jayjamesjay
Copy link
Owner

jayjamesjay commented Mar 20, 2019

To my mind, being able to set the RequestBuilder's body via a Request seems to be very useful.
Implementing From<RequestBuilder> for Request is not a bad idea but I'm not sure if it won't be a bit confusing, because RequestBuilder can use any TcpStream/TlsStream while Request uses predefined ones.

Thanks for contribution. If you can, please add some tests.
I am going to release this upade with the next version of crate.

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

No branches or pull requests

2 participants