@smithy/fetch-http-handler 3.2.4 → 3.2.6

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
@@ -107,7 +107,8 @@ var _FetchHttpHandler = class _FetchHttpHandler {
107
107
  body,
108
108
  headers: new Headers(request.headers),
109
109
  method,
110
- credentials
110
+ credentials,
111
+ cache: this.config.cache ?? "default"
111
112
  };
112
113
  if (body) {
113
114
  requestOptions.duplex = "half";
@@ -118,6 +119,9 @@ var _FetchHttpHandler = class _FetchHttpHandler {
118
119
  if (keepAliveSupport.supported) {
119
120
  requestOptions.keepalive = keepAlive;
120
121
  }
122
+ if (typeof this.config.requestInit === "function") {
123
+ Object.assign(requestOptions, this.config.requestInit(request));
124
+ }
121
125
  let removeSignalEventListener = /* @__PURE__ */ __name(() => {
122
126
  }, "removeSignalEventListener");
123
127
  const fetchRequest = new Request(url, requestOptions);
@@ -59,6 +59,7 @@ export class FetchHttpHandler {
59
59
  headers: new Headers(request.headers),
60
60
  method: method,
61
61
  credentials,
62
+ cache: this.config.cache ?? "default",
62
63
  };
63
64
  if (body) {
64
65
  requestOptions.duplex = "half";
@@ -69,6 +70,9 @@ export class FetchHttpHandler {
69
70
  if (keepAliveSupport.supported) {
70
71
  requestOptions.keepalive = keepAlive;
71
72
  }
73
+ if (typeof this.config.requestInit === "function") {
74
+ Object.assign(requestOptions, this.config.requestInit(request));
75
+ }
72
76
  let removeSignalEventListener = () => { };
73
77
  const fetchRequest = new Request(url, requestOptions);
74
78
  const raceOfPromises = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "3.2.4",
3
+ "version": "3.2.6",
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.0",
28
- "@smithy/querystring-builder": "^3.0.3",
29
- "@smithy/types": "^3.3.0",
27
+ "@smithy/protocol-http": "^4.1.2",
28
+ "@smithy/querystring-builder": "^3.0.5",
29
+ "@smithy/types": "^3.4.1",
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.1",
34
+ "@smithy/abort-controller": "^3.1.3",
35
35
  "concurrently": "7.0.0",
36
36
  "downlevel-dts": "0.10.1",
37
37
  "rimraf": "3.0.2",