Context @HttpRequest
http/server::@HttpRequest
Entries
↪ authorization: Option<Secret<string>>
↪ cookie: Option<Secret<string>>
↪ id: u128
↪ method: HttpMethod (http/method::HttpMethod)
↪ parameters: StringMap (std/data/string_map::StringMap)
↪ path: string
↪ route: string
↪ secret_headers: Map (std/data/map::Map)
Describes HTTP request data.
id: identifier of connection, it is an arbitrary number that uniquely identifies a HTTP connection to a server.route: the route used by the request.path: the path called by the request.parameters: the parameters from the route.method: the HTTP method used by the request.authorization: theAuthorizationheader, if any.cookie: theCookieheader, if any.secret_headers: the headers listed in thesecret_headersof the server, present in the request, asSecret<string>values named after the headers as listed.
Authorization, Cookie and the secret_headers of the server are only given as secrets,
and are left out of the request headers.
They come from the client, so the plain std/secret::reveal treatment may reveal them,
for example to compare a token, and they are masked in logs once revealed.
crypto/token::check compares them with a secret without revealing them to the program.