o.js
o.js copied to clipboard
Support for FormData
Hi, does o.js plan to support FormData
I noticed that there're code in OHandler.ts
which do a JSON.stringify
on request body, which is not needed if the request body is FormData
.
https://github.com/janhommes/o.js/blob/ef5d27e7ebdc5ca348ca1d61a110771dda50469a/src/OHandler.ts#L236
but it's only doing it if the type is object
... otherwise, it is returning the body. So it should be already supported, or do you face any issues? Maybe the type check is not correct :/
https://stackoverflow.com/questions/46146637/detect-if-javascript-object-is-a-formdata-instance
maybe we need to use instanceof?