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
Fixed isFormData predicate; #4413
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added support for automatic object serialization to FormData if `Content-Type` is `multipart/form-data`; Added support for FormData to be overloaded using `config.env.FormData` option; Added support for FormData in node.js environment through `form-data` package;
Closed
I must say I'm a bit concerned about this PR. |
jasonsaayman
added a commit
that referenced
this pull request
Feb 13, 2022
This reverts commit 73e3bdb.
jasonsaayman
added a commit
that referenced
this pull request
Feb 13, 2022
DigitalBrainJS
added a commit
to DigitalBrainJS/axios
that referenced
this pull request
Feb 15, 2022
Added support for automatic object serialization to FormData if `Content-Type` is `multipart/form-data`; Added support for FormData to be overloaded using `config.env.FormData` option; Added support for FormData in node.js environment using `form-data` package; (cherry picked from commit 73e3bdb)
jasonsaayman
pushed a commit
that referenced
this pull request
Mar 14, 2022
* Fixed isFormData predicate; Added support for automatic object serialization to FormData if `Content-Type` is `multipart/form-data`; Added support for FormData to be overloaded using `config.env.FormData` option; Added support for FormData in node.js environment through `form-data` package; * Added the `form-data` package as a dependency for the server build; Added tests for FormData payload; * Added FormData automatic serialization section; Refactored cancellation section; * Reworked toFormData helper; Expose toFormData helper as a static method; Refactored transform request; Added kindOf, kindOfTest, endsWith, isTypedArray util; Refactored utils.js to use kindOf for tests; * Fixed isFormData predicate; (#4413) Added support for automatic object serialization to FormData if `Content-Type` is `multipart/form-data`; Added support for FormData to be overloaded using `config.env.FormData` option; Added support for FormData in node.js environment using `form-data` package; (cherry picked from commit 73e3bdb) * Added shortcut methods `postForm`, `putForm`, `patchForm` to submit a Form; Added ability to submit FileList object as a FormData; Updated README.md; * Updated README.md;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
isFormData
util; (possibly related to Cannot upload file within FormData #4412, Can't post FormData since Axios 0.25.0 #4406). It can detect (at least) native FormData instance, form-data, formdata-nodeContent-Type
ismultipart/form-data
; (toFormData helper function #3757)config.env.FormData
option (for node.js environment);form-data
package (the package is not a dependency);Browser example:
Node.js example
Response: