std :: http::http
Struct std::HttpRequest
struct HttpRequest {
struct String method;
struct String path;
struct String headers;
struct String body;
}Fields
the request-target as sent: "/a/b?x=1"
raw header block, same shape as HttpResponse's
Methods
A request with this method and target and no headers or body — for tests and for calling a Router directly.
Owned copy of the first value for 'name' (any case; empty if absent).
'path' up to the '?' (still percent-encoded), and the part after it (empty when there is none).
The decoded query parameters.
The body parsed as application/x-www-form-urlencoded (regardless of Content-Type — check content_type_is() first if it matters).
1 if the Content-Type's media type (before any ';') equals 'mime', ignoring case: req.content_type_is("application/json").
The value of cookie 'name' from the Cookie header(s); empty if unset.
= drop()