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
If I use this function with FormData as the data automatically changes Content-type headers to Content-Type: multipart/form-data; boundary=----WebKitFormBoundarygUCRrzJieLA2q33y
ignoring my custom header.
If i use the function with data empty it sends properly my custom header. I have a createProduct function using POST with the same FormData and header and it works great. I don't know what I'm doing wrong :(
If I use this function with FormData as the data automatically changes Content-type headers to
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarygUCRrzJieLA2q33y
ignoring my custom header.
If i use the function with data empty it sends properly my custom header. I have a createProduct function using POST with the same FormData and header and it works great. I don't know what I'm doing wrong :(
This is my code:
static updateProduct(data, id_product) { const url = ${API_BASE_URL}+'/producto/'+${id_product}; return axios.put(url, data, { headers: {'Content-Type': 'application/json'}; }); }
The text was updated successfully, but these errors were encountered: