Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Somehow make redirects work #267

Open
sckott opened this issue Jan 16, 2024 · 1 comment
Open

Somehow make redirects work #267

sckott opened this issue Jan 16, 2024 · 1 comment

Comments

@sckott
Copy link
Collaborator

sckott commented Jan 16, 2024

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

🤔 🤔 🤔

@sckott
Copy link
Collaborator Author

sckott commented Feb 4, 2024

Ruby vcr just records all requests when there's a redirect, then matching works just fine. Should be doable ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant