Sha256: b4c74cce2169349a0769d3ce617711768f96d32ec5177b2b8a7a4789af7e3a2d

Contents?: true

Size: 1.59 KB

Versions: 69

Compression:

Stored size: 1.59 KB

Contents

In order to properly replay previously recorded requests, VCR must match new
HTTP requests to a previously recorded one. By default, it matches on HTTP
method and URI, since that is usually deterministic and fully identifies the
resource and action for typical RESTful APIs.

You can customize how VCR matches requests using the `:match_requests_on` cassette option.
Specify an array of attributes to match on.  Supported attributes are:

  - `:method` - The HTTP method (i.e. GET, POST, PUT or DELETE) of the request.
  - `:uri` - The full URI of the request.
  - `:host` - The host of the URI. You can use this (alone, or in combination
    with `:path`) as an alternative to `:uri` to cause VCR to match using a regex
    that matches the host.
  - `:path` - The path of the URI. You can use this (alone, or in combination
    with `:host`) as an alternative to `:uri` to cause VCR to match using a regex
    that matches the path.
  - `:query` - The query string values of the URI. The query string ordering does
    not affect matching results (it's order-agnostic).
  - `:body` - The body of the request.
  - `:headers` - The request headers.

You can also register a custom request matcher. This particularly comes
in handy for dealing with APIs that use non-deterministic URIs (i.e. by
including a timestamp as a query parameter or whatever).

When a cassette contains multiple HTTP interactions that match a request
based on the configured `:match_requests_on` setting, the responses are
sequenced: the first matching request will get the first response,
the second matching request will get the second response, etc.

Version data entries

69 entries across 69 versions & 9 rubygems

Version Path
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/request_matching/README.md
cloudsmith-api-0.49.94 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/request_matching/README.md
cloudsmith-api-0.49.21 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/request_matching/README.md
cloudsmith-api-0.49.15 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/request_matching/README.md
cloudsmith-api-0.49.13 vendor/bundle/ruby/2.6.0/gems/vcr-3.0.3/features/request_matching/README.md
cloudsmith-api-0.49.9 vendor/bundle/ruby/2.3.0/gems/vcr-3.0.3/features/request_matching/README.md
cloudsmith-api-0.44.4 vendor/bundle/ruby/2.3.0/gems/vcr-3.0.3/features/request_matching/README.md
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/vcr-3.0.3/features/request_matching/README.md
cloudsmith-api-0.30.7 vendor/bundle/ruby/2.3.0/gems/vcr-3.0.3/features/request_matching/README.md
color_me_shop-1.0.0 vendor/bundle/ruby/2.5.0/gems/vcr-3.0.3/features/request_matching/README.md
cloudsmith-api-0.21.4 vendor/bundle/ruby/2.3.0/gems/vcr-3.0.3/features/request_matching/README.md
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/vcr-3.0.3/features/request_matching/README.md
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/vcr-3.0.3/features/request_matching/README.md
vcr-3.0.3 features/request_matching/README.md
vcr-3.0.2 features/request_matching/README.md
dwolla_swagger-1.0.6 vendor/bundle/ruby/2.2.0/gems/vcr-2.9.3/features/request_matching/README.md
vcr-3.0.1 features/request_matching/README.md
vcr-3.0.0 features/request_matching/README.md
mustwin-vcr-2.9.3 features/request_matching/README.md
vcr-2.9.3 features/request_matching/README.md