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

allow non-plain object as request body #217

Merged
merged 5 commits into from Sep 14, 2016
Merged

allow non-plain object as request body #217

merged 5 commits into from Sep 14, 2016

Conversation

bisubus
Copy link
Contributor

@bisubus bisubus commented Aug 4, 2016

Closes #212

@sindresorhus
Copy link
Owner

👍

@floatdrop ?

@floatdrop
Copy link
Contributor

@sindresorhus test on this would be nice 🦄

@sindresorhus
Copy link
Owner

Agreed.

@bisubus Would you mind adding a test and fixing the merge conflict?

@bisubus
Copy link
Contributor Author

bisubus commented Sep 10, 2016

@sindresorhus Sure thing, I'll get down to this PR a bit later.

@bisubus
Copy link
Contributor Author

bisubus commented Sep 13, 2016

@sindresorhus Added a couple of tests to match an object that can be passed as a body, since it is no longer validated by is-plain-obj.

@floatdrop floatdrop merged commit 21b8b4a into sindresorhus:master Sep 14, 2016
@floatdrop
Copy link
Contributor

@bisubus thank you! 🎉

floatdrop pushed a commit that referenced this pull request Nov 1, 2016
* allow non-plain object as request body

* add tests for object request body

* fix test for non-plain object request body

* fix tests to pass linter
@yeze322
Copy link

yeze322 commented Sep 28, 2017

Was this PR reverted? Seems the validator is still using is-plain-obj for now, class instances cannot be used as body.

@bisubus
Copy link
Contributor Author

bisubus commented Sep 28, 2017

@yeze322 Yes, it looks like there was a regression in #297. A quick fix is Object.assign({}, obj).

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

4 participants