Replies: 2 comments 1 reply
-
You could construct a string yourself, using the properties of a let mut buf = format!("{} {} {:?}", req.method(), req.uri(), req.version());
for (name, val) in req.headers() {
buf.push_str(&format!("{}: {}\r\n", name, val.to_str().unwrap()));
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you, and another question: How to write full http response? like this
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want get the full http request from the Request like this
I only found the
hyper::body::to_bytes()
, it's used for request body...Beta Was this translation helpful? Give feedback.
All reactions