-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Fix #4440, #3549 - Request ignores false, 0 and '' as body values #4782
Conversation
CI failed with the error unrelated to PR.
Maybe rerun can help? |
Ping @jasonsaayman |
Cool passes CI merging |
Hmm. This PR does not seem to fix anything - Axios will send valid JSON values with a valid content-type header ( void send();
void send(ArrayBuffer data);
void send(ArrayBufferView data);
void send(Blob data);
void send(Document data);
void send(DOMString? data);
void send(FormData data); Calls: send(), send(null) and send('') are equal, so simple In addition, the PR does not handle these values in the right way:
@jasonsaayman maybe this needs to be reviewed again? |
Yeah, I am going to rever this as I should have looked into it a bit more. Thanks for the catch. |
Axios is frequently used to make requests to REST APIs that are under client's control.
There are APIs that expect boolean values like
false
, or number values0
as both are valid JSON values.I see no reason why it shouldn't work. If there are, please point me to it.
If the authors will approve this PR, I can make the same changes to 0.x and 1.x branches.
Thank you.
Related issues: