Struct tk_http::websocket::client::Head
[−]
[src]
pub struct Head<'a> { /* fields omitted */ }
A borrowed structure that represents response headers
It's passed to Authorizer::headers_received
and you are
free to store or discard any needed fields and headers from it.
Methods
impl<'a> Head<'a>
[src]
fn status(&self) -> Option<Status>
Returns status if it is one of the supported statuses otherwise None
Note: this method does not consider "reason" string at all just status code. Which is fine as specification states.
fn raw_status(&self) -> (u16, &'a str)
Returns raw status code and reason as received even
This returns something even if status()
returned None
.
Note: the reason string may not match the status code or may even be an empty string.
fn all_headers(&self) -> &'a [Header<'a>]
All headers of HTTP request
Unlike self.headers()
this does include hop-by-hop headers. This
method is here just for completeness, you shouldn't need it.