-
-
Notifications
You must be signed in to change notification settings - Fork 917
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
Request body can't be querystring.parse(str) #212
Comments
@bisubus I see positive side in this – you should explicitly set fields, that you are sending. P.s. why you are passing result of |
@floatdrop Why to not just get own enumerable properties from the object in this case? As for the example above, the workaround should be I'm quite sure (don't have this piece of code at hand at this moment) that this was done because |
This is right behaviour, if you pass String to @bisubus mind to make a PR? |
Sure, will do this. I see that |
@bisubus Functions are objects. |
@sindresorhus That's correct. This requires this spec to be fixed but otherwise it looks fine. Function type shouldn't be reserved for future use as callbacks here, should it? |
@bisubus We could always just do |
@sindresorhus My guess that the code cannot gain much from |
When the request is supplied with body that differs from
{ ... }
object, it throwsis-plain-object
expects an object to inherit from eithernull
orObject
directly.This makes
to fail, because
querystring.parse(...)
object inherits from empty object that inherits fromnull
.This looks more like a bug rather than zealous sanitization.
The text was updated successfully, but these errors were encountered: