@smithy/fetch-http-handler 3.2.7 → 3.2.9
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
|
@@ -75,6 +75,7 @@ var _FetchHttpHandler = class _FetchHttpHandler {
|
|
|
75
75
|
destroy() {
|
|
76
76
|
}
|
|
77
77
|
async handle(request, { abortSignal } = {}) {
|
|
78
|
+
var _a;
|
|
78
79
|
if (!this.config) {
|
|
79
80
|
this.config = await this.configProvider;
|
|
80
81
|
}
|
|
@@ -107,9 +108,11 @@ var _FetchHttpHandler = class _FetchHttpHandler {
|
|
|
107
108
|
body,
|
|
108
109
|
headers: new Headers(request.headers),
|
|
109
110
|
method,
|
|
110
|
-
credentials
|
|
111
|
-
cache: this.config.cache ?? "default"
|
|
111
|
+
credentials
|
|
112
112
|
};
|
|
113
|
+
if ((_a = this.config) == null ? void 0 : _a.cache) {
|
|
114
|
+
requestOptions.cache = this.config.cache;
|
|
115
|
+
}
|
|
113
116
|
if (body) {
|
|
114
117
|
requestOptions.duplex = "half";
|
|
115
118
|
}
|
|
@@ -59,8 +59,10 @@ export class FetchHttpHandler {
|
|
|
59
59
|
headers: new Headers(request.headers),
|
|
60
60
|
method: method,
|
|
61
61
|
credentials,
|
|
62
|
-
cache: this.config.cache ?? "default",
|
|
63
62
|
};
|
|
63
|
+
if (this.config?.cache) {
|
|
64
|
+
requestOptions.cache = this.config.cache;
|
|
65
|
+
}
|
|
64
66
|
if (body) {
|
|
65
67
|
requestOptions.duplex = "half";
|
|
66
68
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.9",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"module": "./dist-es/index.js",
|
|
25
25
|
"types": "./dist-types/index.d.ts",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@smithy/protocol-http": "^4.1.
|
|
28
|
-
"@smithy/querystring-builder": "^3.0.
|
|
29
|
-
"@smithy/types": "^3.
|
|
27
|
+
"@smithy/protocol-http": "^4.1.4",
|
|
28
|
+
"@smithy/querystring-builder": "^3.0.7",
|
|
29
|
+
"@smithy/types": "^3.5.0",
|
|
30
30
|
"@smithy/util-base64": "^3.0.0",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@smithy/abort-controller": "^3.1.
|
|
34
|
+
"@smithy/abort-controller": "^3.1.5",
|
|
35
35
|
"concurrently": "7.0.0",
|
|
36
36
|
"downlevel-dts": "0.10.1",
|
|
37
37
|
"rimraf": "3.0.2",
|