-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add form support #95
Conversation
Codecov Report
@@ Coverage Diff @@
## main #95 +/- ##
==========================================
+ Coverage 94.30% 96.27% +1.96%
==========================================
Files 7 9 +2
Lines 123 161 +38
Branches 29 34 +5
==========================================
+ Hits 116 155 +39
Misses 5 5
+ Partials 2 1 -1
Continue to review full report at Codecov.
|
src/utils/objectToFormData.ts
Outdated
if (Array.isArray(value)) { | ||
for (const valueElement of value) { | ||
form.append(key, valueElement) | ||
} | ||
|
||
continue | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: may this can be refactored to a recursive function for arrays that have more than one dimension, even I don't think we could need it in a request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been trying to refactor this, but I'm not getting into any conclusion. Maybe a good change for making a refactoring excercise at Acid Labs time
This PR adds support for sending
multipart/form-data
with the following API: