#[non_exhaustive]pub struct HttpResponse {
pub body_length: Option<i64>,
pub code: Option<i64>,
pub content_type: Option<String>,
pub http_headers: Option<Vec<HttpHeader>>,
pub latency: Option<i64>,
pub length: Option<i64>,
pub message: Option<String>,
pub status: Option<String>,
}Expand description
HTTP Response
The HTTP Response object contains detailed information about the response sent from a web server to the requester. It encompasses attributes and metadata that describe the response status, headers, body content, and other relevant information.
[] Category: | Name: http_response
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.body_length: Option<i64>Response Body Length
The actual length of the HTTP response body, in number of bytes, independent of a potentially existing Content-Length header.
optional
code: Option<i64>Response Code
The Hypertext Transfer Protocol (HTTP) status code returned from the web server to the client. For example, 200.
required
content_type: Option<String>HTTP Content Type
The request header that identifies the original media type of the resource (prior to any content encoding applied for sending).
optional
http_headers: Option<Vec<HttpHeader>>HTTP Headers
Additional HTTP headers of an HTTP request or response.
recommended
latency: Option<i64>Latency
The HTTP response latency measured in milliseconds.
optional
length: Option<i64>Response Length
The length of the entire HTTP response, in number of bytes.
optional
message: Option<String>Message
The description of the event/finding, as defined by the source.
optional
status: Option<String>Status
The response status. For example: A successful HTTP status of ‘OK’ which corresponds to a code of 200.
optional
Trait Implementations§
Source§impl Clone for HttpResponse
impl Clone for HttpResponse
Source§fn clone(&self) -> HttpResponse
fn clone(&self) -> HttpResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more