pub struct HarRequest {
pub method: String,
pub url: String,
pub http_version: String,
pub cookies: Vec<HarCookie>,
pub headers: Vec<HarHeader>,
pub query_string: Vec<HarQueryParam>,
pub post_data: Option<HarPostData>,
pub headers_size: i64,
pub body_size: i64,
pub comment: Option<String>,
}Expand description
HTTP request in HAR format
Fields§
§method: StringHTTP method
url: StringRequest URL
http_version: StringHTTP version
Cookies
headers: Vec<HarHeader>Headers
query_string: Vec<HarQueryParam>Query string parameters
post_data: Option<HarPostData>POST data (optional)
headers_size: i64Headers size in bytes (-1 if unknown)
body_size: i64Body size in bytes (-1 if unknown)
comment: Option<String>Optional comment
Implementations§
Source§impl HarRequest
impl HarRequest
Sourcepub fn with_header(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_header( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Add a header
Sourcepub fn with_post_data(self, data: HarPostData) -> Self
pub fn with_post_data(self, data: HarPostData) -> Self
Add POST data
Trait Implementations§
Source§impl Clone for HarRequest
impl Clone for HarRequest
Source§fn clone(&self) -> HarRequest
fn clone(&self) -> HarRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HarRequest
impl Debug for HarRequest
Source§impl<'de> Deserialize<'de> for HarRequest
impl<'de> Deserialize<'de> for HarRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HarRequest
impl RefUnwindSafe for HarRequest
impl Send for HarRequest
impl Sync for HarRequest
impl Unpin for HarRequest
impl UnsafeUnpin for HarRequest
impl UnwindSafe for HarRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more