Skip to content

Matchers

Sergey edited this page Jul 28, 2018 · 2 revisions

YHVMatchers

Available request matchers described by YHVMatchers typedef.

YHVMatcher.method
Matcher based on used request's HTTP method.
Requests will match if both of them has same HTTP request method (like GET or POST).

YHVMatcher.uri
Matcher based on request's complete URI.
Requests will match only if both has same URI string (includes: schema, host, port, path and query parameters).

YHVMatcher.scheme
Matcher based on URI schema.
Requests will match if both use URI with same schema (like http or https).

YHVMatcher.host
Matcher based on URI domain.
Requests will match only if both has same domain in used URI.

YHVMatcher.port
Matcher based on URI host port. Requests will match only if both has same host port in used URI or doesn't have it at all.

YHVMatcher.path
Matcher based on URI path segment.
Requests will match only if both has same path segment in used URI.

YHVMatcher.query
Matcher based on URI query segment.
Requests will match only if both has same query segment in used URI.

YHVMatcher.headers
Matcher based on request headers. Requests will match only if both has same set of header field and values.

YHVMatcher.body
Matched based on POST body.
Requests will match only if they both has POST HTTP method and POST body.

Clone this wiki locally