trying fix for error
This commit is contained in:
14
src/lib.rs
14
src/lib.rs
@ -75,12 +75,18 @@ pub fn derive_http_get_request(input: TokenStream) -> TokenStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let response = actix_web::rt::System::new()
|
let response = actix_web::rt::System::new()
|
||||||
.block_on(async { request.send().await })
|
.block_on(async {
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
|
request.send()
|
||||||
|
.await
|
||||||
|
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))
|
||||||
|
})?;
|
||||||
|
|
||||||
let body_bytes = actix_web::rt::System::new()
|
let body_bytes = actix_web::rt::System::new()
|
||||||
.block_on(async { response.body().await })
|
.block_on(async {
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
|
response.body()
|
||||||
|
.await
|
||||||
|
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))
|
||||||
|
})?;
|
||||||
|
|
||||||
let body = Response::receive(body_bytes.to_vec())
|
let body = Response::receive(body_bytes.to_vec())
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
|
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
|
||||||
|
Reference in New Issue
Block a user