Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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: the Authorization header, if any.
  • cookie: the Cookie header, if any.
  • secret_headers: the headers listed in the secret_headers of the server, present in the request, as Secret<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.