http
Types for talking HTTP: request methods, requests and responses.
Plain data types: use them as fields and arguments in your own schemas.
| Item | Summary |
|---|---|
enum HttpMethod |
An HTTP request method. |
struct Request |
An HTTP request: its method and target URI. |
struct Response |
An HTTP response, by its status code. |
enum HttpMethod
An HTTP request method.
Variants:
GETPOSTPUTDELETE
struct Request
An HTTP request: its method and target URI.
| Field | Type | Description |
|---|---|---|
method |
HttpMethod |
|
uri |
char[max 8192] |
At most 8192 characters, as most servers allow. |
struct Response
An HTTP response, by its status code.
| Field | Type |
|---|---|
status_code |
u16 |