redux-toolkit
redux-toolkit copied to clipboard
Can't change the headers for the request
For all of my requests Content-Type is application/json even if I change it manually with prepareHeaders: (headers) => {headers.set("Content-Type", "multipart/forn-data"); return headers;}. When I try to send the data that contains files I get an error: fields can't be undefined. For my node.js server I'm using multer to upload images and multer only accept multipart/form-data
Can you share some code of what you are doing, preferrable a working CodeSandbox?