pub struct Request {
pub auth: Option<Auth>,
pub headers: Option<HashMap<String, String>>,
pub host: Option<String>,
pub id: Option<String>,
pub method: Option<String>,
pub path: Option<String>,
pub protocol: Option<String>,
pub query: Option<String>,
pub reason: Option<String>,
pub scheme: Option<String>,
pub size: Option<i64>,
pub time: Option<DateTime<Utc>>,
}
Expand description
This message defines attributes for an HTTP request. If the actual request is not an HTTP request, the runtime system should try to map the actual request to an equivalent HTTP request.
This type is not used in any activity, and only used as part of another schema.
Fields§
§auth: Option<Auth>
The request authentication. May be absent for unauthenticated requests. Derived from the HTTP request Authorization
header or equivalent.
headers: Option<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 lowercased, because HTTP header keys are case-insensitive.
host: Option<String>
The HTTP request Host
header value.
id: Option<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.
method: Option<String>
The HTTP request method, such as GET
, POST
.
path: Option<String>
The HTTP URL path, excluding the query parameters.
protocol: Option<String>
The network protocol used with the request, such as “http/1.1”, “spdy/3”, “h2”, “h2c”, “webrtc”, “tcp”, “udp”, “quic”. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for details.
query: Option<String>
The HTTP URL query in the format of name1=value1&name2=value2
, as it appears in the first line of the HTTP request. No decoding is performed.
reason: Option<String>
A special parameter for request reason. It is used by security systems to associate auditing information with a request.
scheme: Option<String>
The HTTP URL scheme, such as http
and https
.
size: Option<i64>
The HTTP request size in bytes. If unknown, it must be -1.
time: Option<DateTime<Utc>>
The timestamp when the destination
service receives the last byte of the request.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Part for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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> 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