http::message
On this page
Requests and responses.
Structs
RequestSource
pub struct RequestA request. A client sends an absolute uri; a server receives the
request target (/path?query) with the host filled in from Host
/ :authority and the scheme from the connection.
A request for
url, which must be absolute.Append a header field.
A text body with
Content-Type: text/plain; charset=utf-8unless one is set.A form body (
application/x-www-form-urlencoded).
ResponseSource
pub struct ResponseA response.
Sourcepub status: StatusCode§
Sourcepub fn new(§status: StatusCode) -> Response 200 with a text body.
200 with a byte body.
Append a header field.
Sourcepub fn with_status(§self, status: StatusCode) -> Response
Enums
VersionSource
pub enum VersionThe protocol a message travelled over.
Trait implementations 1
impl Display for Version