adding method to extract separately string, instead of parse
This commit is contained in:
		@@ -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