Struct aws_sdk_wafv2::types::HttpRequest
source · #[non_exhaustive]pub struct HttpRequest {
pub client_ip: Option<String>,
pub country: Option<String>,
pub uri: Option<String>,
pub method: Option<String>,
pub http_version: Option<String>,
pub headers: Option<Vec<HttpHeader>>,
}
Expand description
Part of the response from GetSampledRequests
. This is a complex type that appears as Request
in the response syntax. HTTPRequest
contains information about one of the web requests.
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.client_ip: Option<String>
The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:
-
c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request -
x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
country: Option<String>
The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.
uri: Option<String>
The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg
.
method: Option<String>
The HTTP method specified in the sampled web request.
http_version: Option<String>
The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
headers: Option<Vec<HttpHeader>>
A complex type that contains the name and value for each header in the sampled web request.
Implementations§
source§impl HttpRequest
impl HttpRequest
sourcepub fn client_ip(&self) -> Option<&str>
pub fn client_ip(&self) -> Option<&str>
The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:
-
c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request -
x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
sourcepub fn country(&self) -> Option<&str>
pub fn country(&self) -> Option<&str>
The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.
sourcepub fn uri(&self) -> Option<&str>
pub fn uri(&self) -> Option<&str>
The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg
.
sourcepub fn http_version(&self) -> Option<&str>
pub fn http_version(&self) -> Option<&str>
The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
sourcepub fn headers(&self) -> &[HttpHeader]
pub fn headers(&self) -> &[HttpHeader]
A complex type that contains the name and value for each header in the sampled web request.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .headers.is_none()
.
source§impl HttpRequest
impl HttpRequest
sourcepub fn builder() -> HttpRequestBuilder
pub fn builder() -> HttpRequestBuilder
Creates a new builder-style object to manufacture HttpRequest
.
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 moresource§impl Debug for HttpRequest
impl Debug for HttpRequest
source§impl PartialEq for HttpRequest
impl PartialEq for HttpRequest
source§fn eq(&self, other: &HttpRequest) -> bool
fn eq(&self, other: &HttpRequest) -> bool
self
and other
values to be equal, and is used
by ==
.