laravel-request 1.1.45 → 1.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/Api.js +2 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "laravel-request",
|
|
3
3
|
"productName": "laravel-request",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.46",
|
|
5
5
|
"description": "laravel-request",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
+
"@msgpack/msgpack": "^3.1.0",
|
|
16
17
|
"axios": "^1.3.2",
|
|
17
18
|
"query-string": "^8.1.0"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
|
-
"@msgpack/msgpack": "^3.1.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/src/Api.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import ApiRequest from "./ApiRequest";
|
|
2
2
|
import axios from "axios";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const msgpack = msgpack5();
|
|
3
|
+
import { decode } from '@msgpack/msgpack';
|
|
6
4
|
|
|
7
5
|
export default class Api {
|
|
8
6
|
|
|
@@ -222,7 +220,7 @@ export default class Api {
|
|
|
222
220
|
let responseData;
|
|
223
221
|
if (contentType && contentType.includes('application/msgpack')) {
|
|
224
222
|
// Если контент типа msgpack, декодируем его
|
|
225
|
-
responseData =
|
|
223
|
+
responseData = decode(response.data);
|
|
226
224
|
} else {
|
|
227
225
|
// Иначе предполагаем JSON и парсим его
|
|
228
226
|
responseData = response.data;
|