Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: Set content type header to `application/json` on REST API requests

Rich Turner194e7cf17cec
diff --git a/ui/component/rest/src/index.ts b/ui/component/rest/src/index.ts
index c7017f6cd..db94671d6 100644
--- a/ui/component/rest/src/index.ts
+++ b/ui/component/rest/src/index.ts
@@ -13,6 +13,7 @@ export class RestApi {
constructor() {
this._axiosInstance = axios.create();
+ this._axiosInstance.defaults.headers["Content-Type"] = "application/json";
this._axiosInstance.interceptors.request.use((config) => {
config.paramsSerializer = params => Qs.stringify(params, {arrayFormat: 'repeat'});
return config;