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]
impl<'t> Request<'t>
pub fn add_protocol(&mut self, protocol: Cow<'t, str>)
[src]
pub fn add_protocol(&mut self, protocol: Cow<'t, str>)
Adds a WebSocket protocol to the request.
pub fn add_header(&mut self, name: Cow<'t, str>, value: Cow<'t, str>)
[src]
pub fn add_header(&mut self, name: Cow<'t, str>, value: Cow<'t, str>)
Adds a custom header to the request.
Trait Implementations
impl<'t> Debug for Request<'t>
[src]
impl<'t> Debug for Request<'t>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<Url> for Request<'static>
[src]
impl From<Url> for Request<'static>