Struct tungstenite::handshake::client::Request
[−]
[src]
pub struct Request<'t> { pub url: Url, pub extra_headers: Option<Vec<(Cow<'t, str>, Cow<'t, str>)>>, }
Client request.
Fields
url: Url
ws://
or wss://
URL to connect to.
extra_headers: Option<Vec<(Cow<'t, str>, Cow<'t, str>)>>
Extra HTTP headers to append to the request.
Methods
impl<'t> Request<'t>
[src]
fn add_protocol(&mut self, protocol: Cow<'t, str>)
[src]
Adds a WebSocket protocol to the request.
fn add_header(&mut self, name: Cow<'t, str>, value: Cow<'t, str>)
[src]
Adds a custom header to the request.