Skip to content

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

Merged
koenvo merged 1 commit intomainfrom
bugfix/json-post-data
Oct 26, 2022
Merged

Use to_js function to convert body to correct javascript type#16
koenvo merged 1 commit intomainfrom
bugfix/json-post-data

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