Request Matching

A core feature of Monster Mock is the ability to return canned HTTP responses for requests matching criteria.

  • host: Request http host. (without port)
  • method: Request http method. It allows more than one separated by pipes "|" Mandatory
  • path: Resource identifier. It allows :value matching. Mandatory
  • queryStringParameters: Array of query strings. It allows more than one value for the same key.
  • headers: Array of headers. It allows more than one value for the same key. Case sensitive!
  • cookies: Array of cookies.
  • body: Body string. It allows * pattern.

In case of queryStringParameters, headers and cookies, the request can be matched only if all defined keys in mock will be present with the exact or glob value.

Glob Matching

Glob matching is available for:

  • host
  • path
  • headers
  • cookies
  • query strings
  • body

Query strings and headers support also global matches (*) in the header/parameter name. For example:

		"headers": {
			"Custom-Header-*": [
				"partial val*"