Configuring Request Matchers

Request Matches are a key concept in Hoverfly. Hoverfly can look for and match on all parts of the incoming request so that it can then respond correctly. This section deals with their configuration.

In order to select a response to return from the sets of request/response pairs that you configure on an API simulation, Hoverfly evaluates the request matchers to find the one that matches the incoming request.

The request matchers are rules that specify what combination of request method, destination, path, headers, query parameters and body content should evaluate positively so that the corresponding response is returned.

Method request matchers can be set to match on ANY HTTP Verb, or a specified HTTP Verb. Destination, path, headers and query parameter matchers can be exact strings, strings containing globs (wildcards), or regular expression patterns.

All of these matchers can be combined so that your simulation can match on specific combinations of method, destination, path, headers, query parameter and body (payload) content.

Last updated