pub struct HttpRequest {
pub method: String,
pub url: String,
pub headers: HttpHeaders,
pub body: HttpBody,
}
Fields§
§method: String
§url: String
§headers: HttpHeaders
§body: HttpBody
Implementations§
Source§impl HttpRequest
impl HttpRequest
pub fn new( method: &str, url: &str, headers: &Vec<&str>, body: &HttpBody, ) -> Self
pub fn prepare( &self, config: &HttpClientConfig, ) -> Result<(Url, u16, Vec<u8>), Error>
Sourcepub async fn build_async(stream: &mut TcpStream) -> Result<Self, Error>
pub async fn build_async(stream: &mut TcpStream) -> Result<Self, Error>
Build request from stream asynchronously
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