Struct tokio_tungstenite::Request
[−]
[src]
pub struct Request<'a> { pub url: Url, pub headers: Vec<(&'a str, &'a str)>, }
A WebSocket request
Fields
url: Url
URL of the request.
headers: Vec<(&'a str, &'a str)>
Extra headers, if any.
Methods
impl<'a> Request<'a>
[src]
fn new<U: Into<Url>>(url: U) -> Self
Constructs a new WebSocket request with a URL or URL string
fn add_protocol(&mut self, protocol: &'a str)
Adds a WebSocket protocol to the request
fn add_header(&mut self, name: &'a str, value: &'a str)
Adds a custom header to the request