reqwew

Trait Response

Source
pub trait Response
where Self: AsRef<[u8]>,
{ // Provided methods fn json<D>(&self) -> Result<D> where D: DeserializeOwned { ... } fn text(&self) -> String { ... } }
Expand description

HTTP response.

Provided Methods§

Source

fn json<D>(&self) -> Result<D>

Deserialize the response into a JSON object.

Source

fn text(&self) -> String

Convert the response into a string.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> Response for T
where T: AsRef<[u8]>,