A Response to a submitted [Request
].
Methods
Get the response as text.
let client = new;
let response = client.get
.body_bytes
.send
.await?;
let response = response.text .await?;
Get the response as a Rune value decoded from JSON.
let client = new;
let response = client.get
.send
.await?;
let response = response.json .await?;
Get the response as bytes.
let client = new;
let response = client.get
.send
.await?;
let response = response.bytes .await?;
Get the status code of the response.
Get the content-length of this response, if known.
Reasons it may not be known:
- The server didn't send a
content-length
header. - The response is compressed and automatically decoded (thus changing the actual decoded length).