Struct wclient::Request [−][src]
pub struct Request {
pub method: HttpMethod,
pub url: String,
// some fields omitted
}Expand description
HTTP request
A request is composed of:
- HTTP method (
GET,POST,PUT,DELETE, … ) - Target URL, for example,
https://myservice.com/users - (optional) Request headers.
- (optional) Request path parameters, for example,
idin the URLhttps://myservice.com/users?id=1111. - (optional) Server cookies
- (optional) Request body of type
Vec[u8]
Request headers, parameters and cookies are represented by a pair of name and value strings.
Additionally, a HttpConfig struct can be used to configure the HTTP connections stablished to
send a Request and receive a Response.
For more information see HTTP Request.
Fields
method: HttpMethodHTTP method
url: StringTarget url