@ventlio/tanstack-query 0.2.28 → 0.2.29
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 +2 -3
- package/dist/index.mjs.map +1 -1
- package/dist/request/buildFormData.d.ts +1 -1
- package/dist/request/buildFormData.js +1 -2
- package/dist/request/buildFormData.js.map +1 -1
- package/dist/request/make-request.js +1 -1
- package/package.json +1 -1
- package/src/request/buildFormData.ts +1 -3
- package/src/request/make-request.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -97,8 +97,7 @@ const buildFormData = (body) => {
|
|
|
97
97
|
bodyKeys.forEach((key) => {
|
|
98
98
|
formData.append(key, body[key]);
|
|
99
99
|
});
|
|
100
|
-
|
|
101
|
-
return body;
|
|
100
|
+
return formData;
|
|
102
101
|
};
|
|
103
102
|
|
|
104
103
|
var HttpMethod;
|
|
@@ -140,7 +139,7 @@ async function makeRequest({ body, method = HttpMethod.GET, path, isFormData, he
|
|
|
140
139
|
// configure body
|
|
141
140
|
body = isFormData ? buildFormData(body) : body;
|
|
142
141
|
// configure request header
|
|
143
|
-
console.log({ isFormData });
|
|
142
|
+
console.log({ isFormData, body });
|
|
144
143
|
if (!isFormData) {
|
|
145
144
|
headers['Content-Type'] = ContentType.APPLICATION_JSON;
|
|
146
145
|
}
|
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 +1 @@
|
|
|
1
|
-
export declare const buildFormData: (body: Record<string, any>) =>
|
|
1
|
+
export declare const buildFormData: (body: Record<string, any>) => FormData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildFormData.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildFormData.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -9,7 +9,7 @@ async function makeRequest({ body, method = request_enum.HttpMethod.GET, path, i
|
|
|
9
9
|
// configure body
|
|
10
10
|
body = isFormData ? buildFormData.buildFormData(body) : body;
|
|
11
11
|
// configure request header
|
|
12
|
-
console.log({ isFormData });
|
|
12
|
+
console.log({ isFormData, body });
|
|
13
13
|
if (!isFormData) {
|
|
14
14
|
headers['Content-Type'] = request_enum.ContentType.APPLICATION_JSON;
|
|
15
15
|
}
|
package/package.json
CHANGED