@ventlio/tanstack-query 0.2.60 → 0.2.61
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/dist/index.mjs
CHANGED
|
@@ -220,13 +220,8 @@ async function makeRequest({ body, method = HttpMethod.GET, path, isFormData, he
|
|
|
220
220
|
delete headers['Content-Type'];
|
|
221
221
|
}
|
|
222
222
|
try {
|
|
223
|
-
const axios = axiosInstance({ baseURL, headers, timeout });
|
|
224
223
|
// send request
|
|
225
|
-
const resp = await axios({
|
|
226
|
-
url: path,
|
|
227
|
-
method,
|
|
228
|
-
data: body,
|
|
229
|
-
});
|
|
224
|
+
const resp = await axios({ baseURL, timeout, headers, method, url: path, data: body });
|
|
230
225
|
// get response json
|
|
231
226
|
const jsonResp = await resp.data;
|
|
232
227
|
// get response code
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var axios = require('axios');
|
|
4
4
|
var buildFormData = require('./buildFormData.js');
|
|
5
5
|
var request_enum = require('./request.enum.js');
|
|
6
6
|
var transformer = require('./transformer.js');
|
|
@@ -16,13 +16,8 @@ async function makeRequest({ body, method = request_enum.HttpMethod.GET, path, i
|
|
|
16
16
|
delete headers['Content-Type'];
|
|
17
17
|
}
|
|
18
18
|
try {
|
|
19
|
-
const axios = axiosInstance.axiosInstance({ baseURL, headers, timeout });
|
|
20
19
|
// send request
|
|
21
|
-
const resp = await axios({
|
|
22
|
-
url: path,
|
|
23
|
-
method,
|
|
24
|
-
data: body,
|
|
25
|
-
});
|
|
20
|
+
const resp = await axios({ baseURL, timeout, headers, method, url: path, data: body });
|
|
26
21
|
// get response json
|
|
27
22
|
const jsonResp = await resp.data;
|
|
28
23
|
// get response code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-request.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"make-request.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import axios from 'axios';
|
|
3
2
|
import { buildFormData } from './buildFormData';
|
|
4
3
|
import { ContentType, HttpMethod } from './request.enum';
|
|
5
4
|
import type { IMakeRequest } from './request.interface';
|
|
@@ -25,14 +24,8 @@ export async function makeRequest<TResponse>({
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
try {
|
|
28
|
-
const axios = axiosInstance({ baseURL, headers, timeout });
|
|
29
|
-
|
|
30
27
|
// send request
|
|
31
|
-
const resp = await axios({
|
|
32
|
-
url: path,
|
|
33
|
-
method,
|
|
34
|
-
data: body,
|
|
35
|
-
});
|
|
28
|
+
const resp = await axios({ baseURL, timeout, headers, method, url: path, data: body });
|
|
36
29
|
|
|
37
30
|
// get response json
|
|
38
31
|
const jsonResp: any = await resp.data;
|