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

Use to_js function to convert body to correct javascript type #16

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

koenvo
Copy link
Owner

@koenvo koenvo commented Oct 10, 2022

This PR is a fix for #15

When the request.body object contains bytes instead of str type, it would be converted to a str type. Converting it into a string results in something like 'b{"query": "data"}'.

@joemarshall would you mind doing a review?

Still need to add tests for this, but it seems it's not yet possible to capture the request body using pytest-pyodide.

@nicornk
Copy link
Contributor

nicornk commented Oct 11, 2022

@koenvo I manually verified your fix to be working. thanks. Anyway I can contribute on this PR?

@koenvo koenvo marked this pull request as ready for review October 12, 2022 14:01
@koenvo koenvo merged commit f403ab1 into main Oct 26, 2022
@koenvo koenvo deleted the bugfix/json-post-data branch October 26, 2022 07:11
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 this pull request may close these issues.

2 participants