From 4448684400e4b6706a8ae47faf390d4463aac90f Mon Sep 17 00:00:00 2001 From: midefos Date: Thu, 23 Jan 2025 17:15:50 +0100 Subject: [PATCH] adding method to extract separately string, instead of parse --- src/requester.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/requester.rs b/src/requester.rs index a92d07d..8ac9622 100644 --- a/src/requester.rs +++ b/src/requester.rs @@ -19,6 +19,6 @@ impl Requester { req: Request, ) -> Result> { let body = req.collect().await?.to_bytes(); - Ok(String::from_utf8_lossy(&body).to_string()) + Ok(String::from_utf8(body.to_vec())?) } }