@smithy/fetch-http-handler 3.2.7 → 3.2.8

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.7",
3
+ "version": "3.2.8",
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'",