Trait RequestLike

Source
pub trait RequestLike {
    // Required method
    fn header(&self, header: &Header) -> Option<HeaderValue>;

    // Provided method
    fn has_header(&self, header: &Header) -> bool { ... }
}
Expand description

Base trait for all request types

Required Methods§

Source

fn header(&self, header: &Header) -> Option<HeaderValue>

Returns an existing header on the request. This method must reflect changes made be the ClientRequestLike::set_header method, with the possible exception of the Authorization header itself.

Provided Methods§

Source

fn has_header(&self, header: &Header) -> bool

Returns true if this request contains a value for the specified header. If this returns true, following requests to header() for the same name must return a value.

Implementations on Foreign Types§

Source§

impl RequestLike for Request

Source§

fn header(&self, header: &Header) -> Option<HeaderValue>

Source§

impl RequestLike for Request

Source§

fn header(&self, header: &Header) -> Option<HeaderValue>

Source§

impl RequestLike for Request

Source§

fn header(&self, header: &Header) -> Option<HeaderValue>

Source§

impl<T: RequestLike> RequestLike for &T

Source§

fn header(&self, header: &Header) -> Option<HeaderValue>

Implementors§