Skip to content

how to turn HttpReponse to string? #2313

Answered by robjtede
vidyli asked this question in General
Discussion options

You must be logged in to vote

simple way using actix-http dep explicitly:
https://docs.rs/actix-http/3.0.0-beta.8/actix_http/body/fn.to_bytes.html

then convert the Bytes to String:
String::from_utf8(&bytes[..])

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vidyli
Comment options

Answer selected by robjtede
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants