<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@contract-case/case-definition-dsl](./case-definition-dsl.md) &gt; [matchers](./case-definition-dsl.matchers.md) &gt; [http](./case-definition-dsl.matchers.http.md) &gt; [HttpRequestExample](./case-definition-dsl.matchers.http.httprequestexample.md)

## matchers.http.HttpRequestExample interface

**Signature:**

```typescript
export interface HttpRequestExample
```

## Properties

<table><thead><tr><th>

Property

</th><th>

Modifiers

</th><th>

Type

</th><th>

Description

</th></tr></thead>
<tbody><tr><td>

[body?](./case-definition-dsl.matchers.http.httprequestexample.body.md)

</td><td>

`readonly`

</td><td>

AnyMatcherOrData

</td><td>

_(Optional)_ A test equivalence matcher or json object that describes the body for this response. If not provided, no body matching is performed.

</td></tr>
<tr><td>

[headers?](./case-definition-dsl.matchers.http.httprequestexample.headers.md)

</td><td>

`readonly`

</td><td>

AnyMatcherOrData

</td><td>

_(Optional)_ A Map of header names and associated test-equivalence matcher values accepted by this example. If not provided, no header matching is performed

</td></tr>
<tr><td>

[method](./case-definition-dsl.matchers.http.httprequestexample.method.md)

</td><td>

`readonly`

</td><td>

AnyStringMatcher

</td><td>

A string or string matcher that matches the method used for this example (eg `"GET"` or `"POST"`<!-- -->). Case insensitive. Note that DELETE, GET and HEAD requests should not have bodies - see the HTTP RFCs for details.

</td></tr>
<tr><td>

[path](./case-definition-dsl.matchers.http.httprequestexample.path.md)

</td><td>

`readonly`

</td><td>

AnyStringMatcher

</td><td>

A string or string matcher that matches the path of this example. Note that any query parameters must be in the query, not in the path.

</td></tr>
<tr><td>

[query?](./case-definition-dsl.matchers.http.httprequestexample.query.md)

</td><td>

`readonly`

</td><td>

AnyMatcherOrData

</td><td>

_(Optional)_ A test-equivalence matcher for the query. Usually this is a Map of test-equivalence matchers to match the parsed query string, keyed by parameter name. Repeated parameters are collated and put in an array in this map.

</td></tr>
<tr><td>

[uniqueName?](./case-definition-dsl.matchers.http.httprequestexample.uniquename.md)

</td><td>

`readonly`

</td><td>

string

</td><td>

_(Optional)_ What unique name, if any, to give to this request

</td></tr>
</tbody></table>
