@smithy/fetch-http-handler 3.0.2 → 3.0.3
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-cjs/index.js
CHANGED
|
@@ -46,7 +46,7 @@ __name(requestTimeout, "requestTimeout");
|
|
|
46
46
|
|
|
47
47
|
// src/fetch-http-handler.ts
|
|
48
48
|
var keepAliveSupport = {
|
|
49
|
-
supported:
|
|
49
|
+
supported: void 0
|
|
50
50
|
};
|
|
51
51
|
var _FetchHttpHandler = class _FetchHttpHandler {
|
|
52
52
|
/**
|
|
@@ -66,6 +66,11 @@ var _FetchHttpHandler = class _FetchHttpHandler {
|
|
|
66
66
|
this.config = options ?? {};
|
|
67
67
|
this.configProvider = Promise.resolve(this.config);
|
|
68
68
|
}
|
|
69
|
+
if (keepAliveSupport.supported === void 0) {
|
|
70
|
+
keepAliveSupport.supported = Boolean(
|
|
71
|
+
typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]")
|
|
72
|
+
);
|
|
73
|
+
}
|
|
69
74
|
}
|
|
70
75
|
destroy() {
|
|
71
76
|
}
|
|
@@ -2,7 +2,7 @@ import { HttpResponse } from "@smithy/protocol-http";
|
|
|
2
2
|
import { buildQueryString } from "@smithy/querystring-builder";
|
|
3
3
|
import { requestTimeout } from "./request-timeout";
|
|
4
4
|
export const keepAliveSupport = {
|
|
5
|
-
supported:
|
|
5
|
+
supported: undefined,
|
|
6
6
|
};
|
|
7
7
|
export class FetchHttpHandler {
|
|
8
8
|
static create(instanceOrOptions) {
|
|
@@ -19,6 +19,9 @@ export class FetchHttpHandler {
|
|
|
19
19
|
this.config = options ?? {};
|
|
20
20
|
this.configProvider = Promise.resolve(this.config);
|
|
21
21
|
}
|
|
22
|
+
if (keepAliveSupport.supported === undefined) {
|
|
23
|
+
keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]"));
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
26
|
destroy() {
|
|
24
27
|
}
|
package/package.json
CHANGED