vcr
vcr copied to clipboard
Somehow make redirects work
This works fine,
use_cassette("aaa", {
GET("https://google.com")
})
But then any subsequent run of the same code block
use_cassette("aaa", {
GET("https://google.com")
})
absofrutely does not work because https://google.com redirects to https://www.google.com, and the https://www.google.com is what's stored in the cassette.
Probably (question mark?) best to capture this and warn the user. Given that we're capturing the requests/responses anyway, I think it would be easy enough to warn if there's either a 301 or similar code, and then tell the user to probably update their request with the new url
🤔 🤔 🤔
Ruby vcr just records all requests when there's a redirect, then matching works just fine. Should be doable ?