adding method to extract separately string, instead of parse
This commit is contained in:
1 parent
cc2661d8ac
commit
4448684400
1 file changed
+1
-1
+1
-1
@@ -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())?)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user