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

AIOHTTP not recording json body #762

Open
cadlagtrader opened this issue Aug 14, 2023 · 1 comment · May be fixed by #768
Open

AIOHTTP not recording json body #762

cadlagtrader opened this issue Aug 14, 2023 · 1 comment · May be fixed by #768

Comments

@cadlagtrader
Copy link

Hello - thanks for this great library !

I spotted an issue with 'data' vs 'json' in aiohttp_stubs vcr_request. When only json is present, vcrpy fails to record

The default fallback (from data to json) works when data is missing in the kwargs, but recent versions of aiohttp _request seems to have data = None when json is present (see @https://github.com/aio-libs/aiohttp/blob/40d8eb88de7674efbd6b001d04c0b91dad1f42d1/aiohttp/client.py#L375C11-L375C11)

@markis
Copy link

markis commented Sep 22, 2023

I noticed the same thing. I think the solution is for vcrpy to pull json first and fallback to data. I have a PR with the change here: #768

@markis markis linked a pull request Sep 22, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants