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,
}

Struct that defines the request.

Fields

Request method

Request path

Request query string

Request headers

Request body

Request matching rules

Methods

impl Request
[src]

[src]

Builds a Request from a Value struct.

[src]

Converts this Request to a Value struct.

[src]

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

[src]

Return a description of all the differences from the other request

Trait Implementations

impl PartialEq for Request
[src]

[src]

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

[src]

This method tests for !=.

impl Debug for Request
[src]

[src]

Formats the value using the given formatter.

impl Clone for Request
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Request
[src]

impl HttpPart for Request
[src]

[src]

Returns the headers of the HTTP part.

[src]

Returns the body of the HTTP part.

[src]

Returns the matching rules of the HTTP part.

[src]

Determins 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

[src]

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

[src]

Returns the general content type (ignoring subtypes)

impl Hash for Request
[src]

[src]

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

1.3.0
[src]

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