You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried ofetch with Bun. It seems to work, but I ran into a small issue when POSTing multipart/form-data. It seems the Bun FormData class has a toJSON method, while Node and Deno do not. It causes the isJSONSerializable() method to return true (exact line below), and therefore sends the serialized payload as application/json instead of multipart/form-data.
Would a value instanceof FormData check make sense here?
Describe the feature
I tried
ofetch
with Bun. It seems to work, but I ran into a small issue when POSTingmultipart/form-data
. It seems the BunFormData
class has atoJSON
method, while Node and Deno do not. It causes theisJSONSerializable()
method to returntrue
(exact line below), and therefore sends the serialized payload asapplication/json
instead ofmultipart/form-data
.Would a
value instanceof FormData
check make sense here?ofetch/src/utils.ts
Line 36 in 7726adb
Additional information
The text was updated successfully, but these errors were encountered: