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

Invert the type checking logic of the payload in order to determine whether to stringify or not #24

Merged
merged 1 commit into from Oct 17, 2022

Conversation

danawoodman
Copy link
Collaborator

This change means that isn't a base type of undefined, string, number, array or object will be passed as-is and the { "content-type": "application/json" } header will be omitted.

This means we don't need to do the individual type checking that we had before, which was really fragile and limited.

…whether to stringify or not

This change means that isn't a base type of `undefined`, `string`, `number`, `array` or `object` will be passed as-is and the `{ "content-type": "application/json" }` header will be omitted.

This means we don't need to do the individual type checking that we had before, which was really fragile and limited.
@kwhitley kwhitley merged commit 387de80 into v0.x Oct 17, 2022
@kwhitley
Copy link
Owner

Passes on my end, and less fragility would be great - thanks (yet again) Dana! :)

@kwhitley
Copy link
Owner

Live in 0.7.3 🥳

@danawoodman danawoodman deleted the 23-improved-payload-type-checking branch October 18, 2022 19:01
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.

None yet

2 participants