Struct hyper::header::Connection
[-] [+]
[src]
pub struct Connection(pub Vec<ConnectionOption>);
Connection
header, defined in
RFC7230
The Connection
header field allows the sender to indicate desired
control options for the current connection. In order to avoid
confusing downstream recipients, a proxy or gateway MUST remove or
replace any received connection options before forwarding the
message.
ABNF
Connection = 1#connection-option
connection-option = token
# Example values
* `close`
* `keep-alive`
* `upgrade`
Methods
impl Connection
fn close() -> Connection
A constructor to easily create a Connection: close
header.
fn keep_alive() -> Connection
A constructor to easily create a Connection: keep-alive
header.