diff --git a/plugs/http/axios.ts b/plugs/http/axios.ts index d368ca2..b376e57 100644 --- a/plugs/http/axios.ts +++ b/plugs/http/axios.ts @@ -37,7 +37,7 @@ _axios.interceptors.request.use( delEmpty(data); data.t = time; } - if (data != null && typeof data === "string") { + if (data != null && typeof data === "string" && config?.headers) { config.headers["Content-Type"] = "text/plain;charset=UTF-8"; } return config;