pub struct Request {
pub url: Url,
pub method: Method,
pub version: u8,
pub headers: HashMap<String, String>,
}
Fields§
§url: Url
§method: Method
§version: u8
§headers: HashMap<String, String>
Implementations§
Source§impl Request
impl Request
Sourcepub fn for_websocket(&self) -> bool
pub fn for_websocket(&self) -> bool
Check if http request a websocket upgrade
[Client requirements][https://tools.ietf.org/html/rfc6455#section-1.2] Client handshake request
§Requirements:
- Version HTTP/1.1
- Method GET
- Headers Upgrade, Connection
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more