pub struct HTTPRequest { /* private fields */ }
Implementations§
Source§impl HTTPRequest
impl HTTPRequest
pub fn new(method: HTTPMethod, uri: &str, body: &[u8]) -> Self
Sourcepub fn add_header(&mut self, key: &str, value: &str)
pub fn add_header(&mut self, key: &str, value: &str)
Adds a header to the request, if the header already exists, it replaces it
pub fn add_query(&mut self, key: &str, value: &str)
pub fn get_method(&self) -> HTTPMethod
pub fn get_uri(&self) -> String
pub fn get_body(&self) -> Vec<u8> ⓘ
pub fn get_header(&self, key: &str) -> Option<String>
pub fn get_query(&self, key: &str) -> Option<String>
Trait Implementations§
Source§impl Clone for HTTPRequest
impl Clone for HTTPRequest
Source§fn clone(&self) -> HTTPRequest
fn clone(&self) -> HTTPRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HTTPRequest
impl RefUnwindSafe for HTTPRequest
impl Send for HTTPRequest
impl Sync for HTTPRequest
impl Unpin for HTTPRequest
impl UnwindSafe for HTTPRequest
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