Is there a way to get the actual/original/raw http response after doing a reqwest::get("https://httpbin.org/ip").send().await?
or from hyper : client.get("https://httpbin.org/ip".parse()?).await?
I need a similar result to what postman returns:
Date: Mon, 13 Jul 2020 07:43:46 GMT
Content-Type: application/json
Content-Length: 33
Connection: keep-alive
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
{
"origin": "102.200.212.40"
}
Somehow reqwest organizes the response too well; into version()
, status()
, headers()
etc.
The reason why I specifically mentioned reqwest and/or hyper, is because these are being used extensively all around the code. I'm hoping that I could still use them, before we try another crate/lib.