Skip to main content

Request

Type Alias Request 

Source
pub type Request = Seen;
Expand description

The request a MockServer::start_with handler receives.

Aliased Type§

pub struct Request {
    pub method: String,
    pub path: String,
    pub headers: Vec<(String, String)>,
    pub body: String,
    pub body_bytes: Vec<u8>,
}

Fields§

§method: String§path: String

Request target as sent, including any query string.

§headers: Vec<(String, String)>

Header names as sent; use Seen::header for case-insensitive lookup.

§body: String

Body as (lossy) UTF-8 text.

§body_bytes: Vec<u8>

Raw body bytes (multipart uploads, binary posts).