@smithy/fetch-http-handler 1.0.1 → 1.0.2
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.
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http";
|
|
2
|
+
import { HttpHandlerOptions, Provider } from "@smithy/types";
|
|
3
|
+
/**
|
|
4
|
+
* Represents the http options that can be passed to a browser http client.
|
|
5
|
+
*/
|
|
6
|
+
export interface FetchHttpHandlerOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The number of milliseconds a request can take before being automatically
|
|
9
|
+
* terminated.
|
|
10
|
+
*/
|
|
11
|
+
requestTimeout?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class FetchHttpHandler implements HttpHandler {
|
|
14
|
+
private config?;
|
|
15
|
+
private readonly configProvider;
|
|
16
|
+
constructor(options?: FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | undefined>);
|
|
17
|
+
destroy(): void;
|
|
18
|
+
handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{
|
|
19
|
+
response: HttpResponse;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requestTimeout(timeoutInMs?: number): Promise<never>;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
|
+
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
8
8
|
"build:es": "tsc -p tsconfig.es.json",
|
|
9
9
|
"build:types": "tsc -p tsconfig.types.json",
|
|
@@ -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": "^1.1.
|
|
28
|
-
"@smithy/querystring-builder": "^1.0.
|
|
29
|
-
"@smithy/types": "^1.1.
|
|
30
|
-
"@smithy/util-base64": "^1.0.
|
|
27
|
+
"@smithy/protocol-http": "^1.1.1",
|
|
28
|
+
"@smithy/querystring-builder": "^1.0.2",
|
|
29
|
+
"@smithy/types": "^1.1.1",
|
|
30
|
+
"@smithy/util-base64": "^1.0.2",
|
|
31
31
|
"tslib": "^2.5.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@smithy/abort-controller": "^1.0.
|
|
34
|
+
"@smithy/abort-controller": "^1.0.2",
|
|
35
35
|
"@tsconfig/recommended": "1.0.1",
|
|
36
36
|
"@types/chai-as-promised": "^7.1.2",
|
|
37
37
|
"chai": "^4.2.0",
|