jsonapi-react icon indicating copy to clipboard operation
jsonapi-react copied to clipboard

Sending FormData through client.mutate()

Open pranaybinju opened this issue 9 months ago • 0 comments

Is there any way I can send FormData through client.mutate() ? I have a file which needs to be sent as FormData to backend as POST request. We are using a wrapper function over client.mutate() to send file, but it is sent as blank object, seems due to JSON.stringify present inside the mutate function applied to data.

https://github.com/aribouius/jsonapi-react/blob/025e7f64eb106de2ab1d41cb9812e5cc1a4b294a/src/client.js#L239

Would be helpful if you can suggest a way for it.

pranaybinju avatar Mar 06 '25 08:03 pranaybinju