🐛 Remove default headers for PUT and PATCH (#2434)

This commit is contained in:
Omar Ajoue 2021-11-15 17:20:28 +01:00 committed by GitHub
parent 7a37f73eae
commit 9f7113c94b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,6 +87,8 @@ import {
axios.defaults.timeout = 300000;
// Prevent axios from adding x-form-www-urlencoded headers by default
axios.defaults.headers.post = {};
axios.defaults.headers.put = {};
axios.defaults.headers.patch = {};
axios.defaults.paramsSerializer = (params) => {
if (params instanceof URLSearchParams) {
return params.toString();