Http module

Request

structSource

A parsed request, as handlers and middleware see it. The strings (target, header names and values) stay valid until the response has been written: copy what has to outlive the request. The body is not here: take a *Body parameter to read it (see Body), or Json(T), Form(T).

Fields

method: Method
method_text: string
the spelling on the wire, for methods the codec does not know
target: string
the request target as sent: /users/7?x=1
path: string
the target without its query, still percent-encoded
query: string
the text after ?, still percent-encoded
version: Version
headers: [] Header_Field

See also