Struct pact_matching::models::Request[][src]

pub struct Request {
    pub method: String,
    pub path: String,
    pub query: Option<HashMap<String, Vec<String>>>,
    pub headers: Option<HashMap<String, String>>,
    pub body: OptionalBody,
    pub matching_rules: MatchingRules,
    pub generators: Generators,
}

Struct that defines the request.

Fields

Request method

Request path

Request query string

Request headers

Request body

Request matching rules

Request generators

Methods

impl Request
[src]

Builds a Request from a Value struct.

Converts this Request to a Value struct.

Returns the default request: a GET request to the root.

Important traits for Vec<u8>

Return a description of all the differences from the other request

Trait Implementations

impl PartialEq for Request
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Request
[src]

Formats the value using the given formatter. Read more

impl Clone for Request
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Request
[src]

impl HttpPart for Request
[src]

Returns the headers of the HTTP part.

Returns the body of the HTTP part.

Returns the matching rules of the HTTP part.

Returns the generators of the HTTP part.

Determine the content type of the HTTP part. If a Content-Type header is present, the value of that header will be returned. Otherwise, the body will be inspected. Read more

Tries to detect the content type of the body by matching some regular expressions against the first 32 characters. Default to text/plain if no match is found. Read more

Returns the general content type (ignoring subtypes)

impl Hash for Request
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Request

impl Sync for Request