pub struct Http {
pub request: HttpRequest,
pub response: HttpResponse,
pub trans_depth: usize,
}
Expand description
Parsed HTTP transaction contents.
Fields§
§request: HttpRequest
HTTP Request.
response: HttpResponse
HTTP Response.
trans_depth: usize
The pipelined depth into the connection of this transaction.
Implementations§
source§impl Http
impl Http
sourcepub fn request_version(&self) -> &str
pub fn request_version(&self) -> &str
Returns the HTTP request version, or ""
if it does not exist.
sourcepub fn user_agent(&self) -> &str
pub fn user_agent(&self) -> &str
Returns the user agent string of the user agent, or ""
if it does not exist.
Returns HTTP cookies sent by the client, or ""
if it does not exist.
sourcepub fn host(&self) -> &str
pub fn host(&self) -> &str
Returns the domain name of the server specified by the client, or ""
if it does not exist.
sourcepub fn request_content_length(&self) -> usize
pub fn request_content_length(&self) -> usize
Returns the size of the request body in bytes, or 0
if it does not exist.
sourcepub fn request_content_type(&self) -> &str
pub fn request_content_type(&self) -> &str
Returns the media type of the request resource, or ""
if it does not exist.
sourcepub fn request_transfer_encoding(&self) -> &str
pub fn request_transfer_encoding(&self) -> &str
Returns the form of encoding used to transfer the request body, or ""
if it does not
exist.
sourcepub fn response_version(&self) -> &str
pub fn response_version(&self) -> &str
Returns the HTTP response version, or ""
if it does not exist.
sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
Returns the HTTP status code, or 0
if it does not exist.
sourcepub fn status_msg(&self) -> &str
pub fn status_msg(&self) -> &str
Returns the HTTP status tet, or 0
if it does not exist.
sourcepub fn response_content_length(&self) -> usize
pub fn response_content_length(&self) -> usize
Returns the size of the request body in bytes, or 0
if it does not exist.
sourcepub fn response_content_type(&self) -> &str
pub fn response_content_type(&self) -> &str
Returns the media type of the response resource, or ""
if it does not exist.
sourcepub fn response_transfer_encoding(&self) -> &str
pub fn response_transfer_encoding(&self) -> &str
Returns the form of encoding used to transfer the response body, or ""
if it does not
exist.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Http
impl RefUnwindSafe for Http
impl Send for Http
impl Sync for Http
impl Unpin for Http
impl UnwindSafe for Http
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
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>
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