Comments (3)
Hello,
Is it possible to ignore this first request or mock it within same cassette?
Single cassette can contain multiple http requests and responses. When replaying, one response among multiple ones, will be returned based on the request parameters. The following is one example.
- https://github.com/parroty/exvcr/blob/master/test/adapter_ibrowse_test.exs#L20
- https://github.com/parroty/exvcr/blob/master/fixture/vcr_cassettes/example_ibrowse_multiple.json
Does this cover your scenario?
I'm not so clear about "ignore this first request" scenario though. What would be the expected behavior when replaying for the first request?
from exvcr.
@parroty as you see topic changed a couple of times - it wasn't clear here as well and I just played with all possible options.
Multiple requests inside one use_cassette
block totally covers my scenario. Thank you for the work!
from exvcr.
Understood, thanks for the explanation.
from exvcr.
Related Issues (20)
- Request was made? HOT 1
- ExVCR.IEx not working with adapter: ExVCR.Adapter.Hackney HOT 2
- disable global mock HOT 14
- Global Mock does not use cassettes with HTTPoison HOT 2
- How to use ExVCR with Finch? HOT 3
- Filter sensitive data after all request made HOT 1
- Support `mix vcr.check --include mytag` ?
- Can't match json response bodies for removing sensitive data? HOT 1
- Cassettes are not injected after test cases! HOT 1
- ** (ArgumentError) argument error
- Support for Finch 0.9.x? HOT 1
- Feature request: `start_cassette` and `stop_cassette`
- Same as vcr request: save response json body with more formatting HOT 1
- Generated custom_cassettes with patchfile HOT 1
- Wrong responses when HTTPoison is used from async Task HOT 4
- Async tests using Bypass interfere with ExVcr tests HOT 3
- support httpoison 2.0 HOT 1
- Version `0.14.0` cannot be compiled in projects not using `Finch`
- Unable to record when specifying a receive_timeout option
- Long list of warnings on Elixir 1.16 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exvcr.