adding method to extract separately string, instead of parse
This commit is contained in:
parent
cc2661d8ac
commit
4448684400
@ -19,6 +19,6 @@ impl Requester {
|
||||
req: Request<Incoming>,
|
||||
) -> Result<String, Box<dyn Error + Send + Sync>> {
|
||||
let body = req.collect().await?.to_bytes();
|
||||
Ok(String::from_utf8_lossy(&body).to_string())
|
||||
Ok(String::from_utf8(body.to_vec())?)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user