Updates
This commit is contained in:
parent
d985503688
commit
d109388af5
@ -48,9 +48,12 @@ export default async function fetchApi<
|
||||
let fetchData;
|
||||
let fetchOptions: RequestInit = {};
|
||||
|
||||
if (options.method.match(/get/i) || !options.method) {
|
||||
} else {
|
||||
if (options.body && typeof options.body === "object") {
|
||||
fetchOptions.body = JSON.stringify(options.body);
|
||||
}
|
||||
}
|
||||
|
||||
fetchOptions.headers = _.merge(finalHeaders, options.headers || {});
|
||||
|
||||
|
||||
4
dist/client/fetch/index.js
vendored
4
dist/client/fetch/index.js
vendored
@ -52,9 +52,13 @@ function fetchApi(url, options) {
|
||||
try {
|
||||
let fetchData;
|
||||
let fetchOptions = {};
|
||||
if (options.method.match(/get/i) || !options.method) {
|
||||
}
|
||||
else {
|
||||
if (options.body && typeof options.body === "object") {
|
||||
fetchOptions.body = JSON.stringify(options.body);
|
||||
}
|
||||
}
|
||||
fetchOptions.headers = lodash_1.default.merge(finalHeaders, options.headers || {});
|
||||
fetchData = yield fetch(url, fetchOptions);
|
||||
data = fetchData.json();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "5.7.9",
|
||||
"version": "5.7.11",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user