pub struct HttpRequest {}
Expand description
This message defines attributes for an HTTP request. HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests. [#next-free-field: 14]
Fields§
§id: String
The unique ID for a request, which can be propagated to downstream systems. The ID should have low probability of collision within a single day for a specific service. For HTTP requests, it should be X-Request-ID or equivalent.
method: String
The HTTP request method, such as GET
, POST
.
headers: HashMap<String, String>
The HTTP request headers. If multiple headers share the same key, they
must be merged according to the HTTP spec. All header keys must be
lower-cased, because HTTP header keys are case-insensitive.
Header value is encoded as UTF-8 string. Non-UTF-8 characters will be replaced by “!”.
This field will not be set if
:ref:encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>
is set to true.
header_map: Option<HeaderMap>
A list of the raw HTTP request headers. This is used instead of
:ref:headers <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.headers>
when
:ref:encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>
is set to true.
Note that this is not actually a map type. header_map
contains a single repeated field
headers
.
Here, only the key
and raw_value
fields will be populated for each HeaderValue, and
that is only when
:ref:encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>
is set to true.
Also, unlike the
:ref:headers <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.headers>
field, headers with the same key are not combined into a single comma separated header.
path: String
The request target, as it appears in the first line of the HTTP request. This includes the URL path and query-string. No decoding is performed.
host: String
The HTTP request Host
or :authority
header value.
scheme: String
The HTTP URL scheme, such as http
and https
.
query: String
This field is always empty, and exists for compatibility reasons. The HTTP URL query is
included in path
field.
fragment: String
This field is always empty, and exists for compatibility reasons. The URL fragment is not submitted as part of HTTP requests; it is unknowable.
size: i64
The HTTP request size in bytes. If unknown, it must be -1.
protocol: String
The network protocol used with the request, such as “HTTP/1.0”, “HTTP/1.1”, or “HTTP/2”.
See :repo:headers.h:ProtocolStrings <source/common/http/headers.h>
for a list of all
possible values.
body: String
The HTTP request body.
raw_body: Vec<u8>
The HTTP request body in bytes. This is used instead of
:ref:body <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.body>
when
:ref:pack_as_bytes <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.BufferSettings.pack_as_bytes>
is set to true.
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 Default for HttpRequest
impl Default for HttpRequest
Source§impl Message for HttpRequest
impl Message for HttpRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for HttpRequest
impl Name for HttpRequest
Source§const NAME: &'static str = "HttpRequest"
const NAME: &'static str = "HttpRequest"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.service.auth.v3"
const PACKAGE: &'static str = "envoy.service.auth.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for HttpRequest
impl PartialEq for HttpRequest
impl StructuralPartialEq for HttpRequest
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnwindSafe for HttpRequest
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request