@aws-sdk/middleware-expect-continue
Advanced tools
Comparing version 3.567.0 to 3.572.0
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -31,8 +32,11 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
return (next) => async (args) => { | ||
var _a, _b; | ||
const { request } = args; | ||
if (import_protocol_http.HttpRequest.isInstance(request) && request.body && options.runtime === "node") { | ||
request.headers = { | ||
...request.headers, | ||
Expect: "100-continue" | ||
}; | ||
if (((_b = (_a = options.requestHandler) == null ? void 0 : _a.constructor) == null ? void 0 : _b.name) !== "FetchHttpHandler") { | ||
request.headers = { | ||
...request.headers, | ||
Expect: "100-continue" | ||
}; | ||
} | ||
} | ||
@@ -39,0 +43,0 @@ return next({ |
@@ -6,6 +6,8 @@ import { HttpRequest } from "@smithy/protocol-http"; | ||
if (HttpRequest.isInstance(request) && request.body && options.runtime === "node") { | ||
request.headers = { | ||
...request.headers, | ||
Expect: "100-continue", | ||
}; | ||
if (options.requestHandler?.constructor?.name !== "FetchHttpHandler") { | ||
request.headers = { | ||
...request.headers, | ||
Expect: "100-continue", | ||
}; | ||
} | ||
} | ||
@@ -12,0 +14,0 @@ return next({ |
@@ -1,4 +0,6 @@ | ||
import { BuildHandlerOptions, BuildMiddleware, Pluggable } from "@smithy/types"; | ||
import { HttpHandler } from "@smithy/protocol-http"; | ||
import { BuildHandlerOptions, BuildMiddleware, Pluggable, RequestHandler } from "@smithy/types"; | ||
interface PreviouslyResolved { | ||
runtime: string; | ||
requestHandler?: RequestHandler<any, any, any> | HttpHandler<any>; | ||
} | ||
@@ -5,0 +7,0 @@ export declare function addExpectContinueMiddleware(options: PreviouslyResolved): BuildMiddleware<any, any>; |
@@ -1,4 +0,11 @@ | ||
import { BuildHandlerOptions, BuildMiddleware, Pluggable } from "@smithy/types"; | ||
import { HttpHandler } from "@smithy/protocol-http"; | ||
import { | ||
BuildHandlerOptions, | ||
BuildMiddleware, | ||
Pluggable, | ||
RequestHandler, | ||
} from "@smithy/types"; | ||
interface PreviouslyResolved { | ||
runtime: string; | ||
requestHandler?: RequestHandler<any, any, any> | HttpHandler<any>; | ||
} | ||
@@ -5,0 +12,0 @@ export declare function addExpectContinueMiddleware( |
{ | ||
"name": "@aws-sdk/middleware-expect-continue", | ||
"version": "3.567.0", | ||
"version": "3.572.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", |
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
18058
122