@smithy/fetch-http-handler
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -100,8 +100,15 @@ var __defProp = Object.defineProperty; | ||
const body = method === "GET" || method === "HEAD" ? void 0 : request.body; | ||
const requestOptions = { body, headers: new Headers(request.headers), method }; | ||
const requestOptions = { | ||
body, | ||
headers: new Headers(request.headers), | ||
method | ||
}; | ||
if (body) { | ||
requestOptions.duplex = "half"; | ||
} | ||
if (typeof AbortController !== "undefined") { | ||
requestOptions["signal"] = abortSignal; | ||
requestOptions.signal = abortSignal; | ||
} | ||
if (keepAliveSupport.supported) { | ||
requestOptions["keepalive"] = keepAlive; | ||
requestOptions.keepalive = keepAlive; | ||
} | ||
@@ -108,0 +115,0 @@ const fetchRequest = new Request(url, requestOptions); |
@@ -53,8 +53,15 @@ import { HttpResponse } from "@smithy/protocol-http"; | ||
const body = method === "GET" || method === "HEAD" ? undefined : request.body; | ||
const requestOptions = { body, headers: new Headers(request.headers), method: method }; | ||
const requestOptions = { | ||
body, | ||
headers: new Headers(request.headers), | ||
method: method, | ||
}; | ||
if (body) { | ||
requestOptions.duplex = "half"; | ||
} | ||
if (typeof AbortController !== "undefined") { | ||
requestOptions["signal"] = abortSignal; | ||
requestOptions.signal = abortSignal; | ||
} | ||
if (keepAliveSupport.supported) { | ||
requestOptions["keepalive"] = keepAlive; | ||
requestOptions.keepalive = keepAlive; | ||
} | ||
@@ -61,0 +68,0 @@ const fetchRequest = new Request(url, requestOptions); |
{ | ||
"name": "@smithy/fetch-http-handler", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Provides a way to make requests", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
31837
482