pub struct HTTPRequest { /* private fields */ }Expand description
An HTTP request
Implementations§
Source§impl HTTPRequest
impl HTTPRequest
Sourcepub fn new(
method: HTTPMethod,
path: String,
header: Vec<HTTPRequestHeaders>,
body: Option<String>,
) -> HTTPRequest
pub fn new( method: HTTPMethod, path: String, header: Vec<HTTPRequestHeaders>, body: Option<String>, ) -> HTTPRequest
construct a new HTTP request
Sourcepub fn from_string(
req_string: String,
) -> Result<HTTPRequest, HTTPRequestParsingError>
pub fn from_string( req_string: String, ) -> Result<HTTPRequest, HTTPRequestParsingError>
Sourcepub fn get_method(&self) -> HTTPMethod
pub fn get_method(&self) -> HTTPMethod
get the method used
Sourcepub fn get_header(&self) -> &Vec<HTTPRequestHeaders>
pub fn get_header(&self) -> &Vec<HTTPRequestHeaders>
get the header of the request
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