#[non_exhaustive]pub struct HttpRequest {
pub args: Option<String>,
pub body_length: Option<i64>,
pub http_headers: Option<Vec<HttpHeader>>,
pub http_method: Option<String>,
pub length: Option<i64>,
pub referrer: Option<String>,
pub uid: Option<String>,
pub url: Option<Box<Url>>,
pub user_agent: Option<String>,
pub version: Option<String>,
pub x_forwarded_for: Option<Vec<String>>,
}Expand description
HTTP Request
The HTTP Request object represents the attributes of a request made to a web server. It encapsulates the details and metadata associated with an HTTP request, including the request method, headers, URL, query parameters, body content, and other relevant information.
[] Category: | Name: http_request
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.args: Option<String>HTTP Arguments
The arguments sent along with the HTTP request.
optional
body_length: Option<i64>Request Body Length
The actual length of the HTTP request body, in number of bytes, independent of a potentially existing Content-Length header.
optional
http_headers: Option<Vec<HttpHeader>>HTTP Headers
Additional HTTP headers of an HTTP request or response.
recommended
http_method: Option<String>HTTP Method
The HTTP request method indicates the desired action to be performed for a given resource.
recommended
length: Option<i64>Request Length
The length of the entire HTTP request, in number of bytes.
optional
referrer: Option<String>HTTP Referrer
The request header that identifies the address of the previous web page, which is linked to the current web page or resource being requested.
optional
uid: Option<String>Unique ID
The unique identifier of the http request.
optional
url: Option<Box<Url>>URL
The URL object that pertains to the request.
recommended
user_agent: Option<String>HTTP User-Agent
The request header that identifies the operating system and web browser.
recommended
version: Option<String>HTTP Version
The Hypertext Transfer Protocol (HTTP) version.
recommended
x_forwarded_for: Option<Vec<String>>X-Forwarded-For
The X-Forwarded-For header identifying the originating IP address(es) of a client connecting to a web server through an HTTP proxy or a load balancer.
optional
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more