pub struct Request {
pub method: HttpMethod,
pub path: String,
/* private fields */
}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
path: StringRequest path
Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl !RefUnwindSafe for Request
impl !Send for Request
impl !Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more