Skip to content

Fix object spread on body#102

Merged
niftylettuce merged 1 commit intoladjs:masterfrom
bradjones1:bugfix/fix-object-spreading
Nov 27, 2019
Merged

Fix object spread on body#102
niftylettuce merged 1 commit intoladjs:masterfrom
bradjones1:bugfix/fix-object-spreading

Conversation

@bradjones1
Copy link
Contributor

Fixes #94 by enforcing a type check on the provided body; if it is an object, it's safe to do a spread with the default. Otherwise, it passes through as-is. Addresses the need to send strings, for instance.

Keep in mind I'm not normally a JavaScript developer and haven't been able to run automated tests locally, though I have tested this locally in so far as it fixes the problem described in the ticket.

@niftylettuce niftylettuce merged commit e4278f2 into ladjs:master Nov 27, 2019
@niftylettuce
Copy link
Collaborator

I am working on this now

@niftylettuce
Copy link
Collaborator

Released on npm as frisbee@3.1.1 🎉

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.

Error: unsupported BodyInit type when attempting to post data to endpoint accepting the "application/x-www-form-urlencoded" content-type

2 participants