@nestia/fetcher
Advanced tools
Comparing version 3.19.0-dev.20241111 to 3.19.0-dev.20241112
@@ -126,3 +126,3 @@ "use strict"; | ||
headers = __assign({}, ((_g = connection.headers) !== null && _g !== void 0 ? _g : {})); | ||
if (input !== undefined) | ||
if (input !== undefined) { | ||
if (((_h = route.request) === null || _h === void 0 ? void 0 : _h.type) === undefined) | ||
@@ -132,2 +132,5 @@ throw new Error("Error on ".concat(props.className, ".fetch(): no content-type being configured.")); | ||
headers["Content-Type"] = route.request.type; | ||
} | ||
else if (input === undefined && headers["Content-Type"] !== undefined) | ||
delete headers["Content-Type"]; | ||
init = __assign(__assign({}, ((_j = connection.options) !== null && _j !== void 0 ? _j : {})), { method: route.method, headers: (function () { | ||
@@ -134,0 +137,0 @@ var e_1, _a, e_2, _b; |
{ | ||
"name": "@nestia/fetcher", | ||
"version": "3.19.0-dev.20241111", | ||
"version": "3.19.0-dev.20241112", | ||
"description": "Fetcher library of Nestia SDK", | ||
@@ -9,3 +9,3 @@ "main": "lib/index.js", | ||
"build": "rimraf lib && tsc", | ||
"dev": "npm run build -- --watch", | ||
"dev": "tsc -p tsconfig.test.json --watch", | ||
"eslint": "eslint src", | ||
@@ -12,0 +12,0 @@ "eslint:fix": "eslint src --fix" |
@@ -77,3 +77,3 @@ import { HttpError } from "../HttpError"; | ||
}; | ||
if (input !== undefined) | ||
if (input !== undefined) { | ||
if (route.request?.type === undefined) | ||
@@ -85,2 +85,4 @@ throw new Error( | ||
headers["Content-Type"] = route.request.type; | ||
} else if (input === undefined && headers["Content-Type"] !== undefined) | ||
delete headers["Content-Type"]; | ||
@@ -87,0 +89,0 @@ // INIT REQUEST DATA |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159706
3277