mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
replace msgpack with msgpackr - https://github.com/emsesp/EMS-ESP32/issues/1112
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { decode } from '@msgpack/msgpack';
|
||||
import axios from 'axios';
|
||||
import { unpack } from './unpack';
|
||||
|
||||
import type { AxiosPromise, CancelToken, AxiosProgressEvent } from 'axios';
|
||||
|
||||
export const WS_BASE_URL = '/ws/';
|
||||
@@ -72,7 +73,8 @@ export const AXIOS_BIN = axios.create({
|
||||
return JSON.stringify(data);
|
||||
}
|
||||
],
|
||||
transformResponse: [(data) => decode(data)]
|
||||
// transformResponse: [(data) => decode(data)]
|
||||
transformResponse: [(data) => unpack(data)] // new using msgpackr
|
||||
});
|
||||
|
||||
export interface FileUploadConfig {
|
||||
|
||||
Reference in New Issue
Block a user