Expand description
HTTP primitives: Request, Response, response builders, and a small
FormData parser shared by query strings and form bodies.
Request wraps hyper::Request and adds a typed per-request
Context. It derefs to the underlying hyper request so the usual
accessors (.method(), .uri(), .headers(), .body_mut()) are
available directly.
Structs§
- Form
Data - Parsed
application/x-www-form-urlencodeddata. - Request
- Incoming HTTP request with an attached per-request
Context.
Functions§
- html
- Build a
200 OKresponse withtext/htmlcontent type. - json_
raw - Build a
200 OKresponse withapplication/jsoncontent type. - set_
cookie - Append a
Set-Cookieheader to a response. - status_
text - Build a response with an arbitrary status code and a
text/plainbody. - text
- Build a
200 OKresponse withtext/plaincontent type.