Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Support schemas with body encoding #15

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Conversation

shinzui
Copy link
Contributor

@shinzui shinzui commented Apr 11, 2023

Changes

I updated the request/response inference to support schemas whose content types have an encoding set to utf8 (application/json;charset=utf-8).

How to Review

I modified the test schema to have a failing test.

Checklist

  • Tests updated
  • README updated

@shinzui shinzui changed the title Support setting body encoding Support schemas with body encoding Apr 11, 2023
@drwpow
Copy link
Owner

drwpow commented Apr 11, 2023

I’m OK with this change. But in the test YAML file, could you add an additional test rather than modifying the existing one? Thanks!

@shinzui
Copy link
Contributor Author

shinzui commented Apr 11, 2023

II'mOK with this change. But in the test YAML file, could you add an additional test rather than modifying the existing one?

You're right. I should've added a new test. I just pushed a fix.

@@ -204,6 +204,28 @@ describe('post()', () => {
expect(error).toBe(undefined);
});

it('supports sepecifying utf-8 encoding', async () => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@drwpow drwpow merged commit fce1546 into drwpow:main Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants