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

HTTP 5.0 no longer supports VCR #672

Closed
hugopassos opened this issue Jun 1, 2021 · 6 comments
Closed

HTTP 5.0 no longer supports VCR #672

hugopassos opened this issue Jun 1, 2021 · 6 comments

Comments

@hugopassos
Copy link

hugopassos commented Jun 1, 2021

As a result of #546, requests made with VCR are now raising the error KeyError: key not found: :request as the parameter request is not sent by it:

image

The error will be raised at /lib/http/response.rb:46

Can't it behave like an optional parameter like it was in the previous version of the gem?

@tarcieri
Copy link
Member

tarcieri commented Jun 1, 2021

It seems like for the purposes of VCR, which is trying to simulate how real-world requests behave, it should probably start passing :request for http.rb v5. Otherwise it will be missing for VCR-simulated requests, which seems like you'd get different behavior depending on whether or not you're using VCR.

We could potentially allow :request to be omitted as a workaround, but that seems suboptimal for the specific use case of VCR, IMO.

@hugopassos
Copy link
Author

I get your point. So maybe I should open an issue in there? Sorry I am no specialist in this matter and my first thought was to do it in here as in previous HTTP.rb versions it worked fine, and it is also working fine in other libraries

@tarcieri
Copy link
Member

tarcieri commented Jun 1, 2021

IIRC VCR uses webmock (haven't used it in awhile, sorry) so that would probably be the right place to enquire about this. There might already be a relevant issue.

@cesc1989
Copy link

👋🏽 @hugopassos this was fixed in bblimke/webmock#940

Update webmock to 3.13.0

@tarcieri
Copy link
Member

Awesome, thanks!

@hugopassos
Copy link
Author

@cesc1989 thanks!

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

No branches or pull requests

3 participants