@aws-sdk/xhr-http-handler 3.460.0 → 3.465.0
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.
|
@@ -20,6 +20,12 @@ const EVENTS = {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
class XhrHttpHandler extends events_1.EventEmitter {
|
|
23
|
+
static create(instanceOrOptions) {
|
|
24
|
+
if (typeof (instanceOrOptions === null || instanceOrOptions === void 0 ? void 0 : instanceOrOptions.handle) === "function") {
|
|
25
|
+
return instanceOrOptions;
|
|
26
|
+
}
|
|
27
|
+
return new XhrHttpHandler(instanceOrOptions);
|
|
28
|
+
}
|
|
23
29
|
constructor(options) {
|
|
24
30
|
super();
|
|
25
31
|
if (typeof options === "function") {
|
|
@@ -17,6 +17,12 @@ const EVENTS = {
|
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
export class XhrHttpHandler extends EventEmitter {
|
|
20
|
+
static create(instanceOrOptions) {
|
|
21
|
+
if (typeof instanceOrOptions?.handle === "function") {
|
|
22
|
+
return instanceOrOptions;
|
|
23
|
+
}
|
|
24
|
+
return new XhrHttpHandler(instanceOrOptions);
|
|
25
|
+
}
|
|
20
26
|
constructor(options) {
|
|
21
27
|
super();
|
|
22
28
|
if (typeof options === "function") {
|
|
@@ -18,6 +18,9 @@ export declare class XhrHttpHandler
|
|
|
18
18
|
static readonly ERROR_IDENTIFIER = "XHR_HTTP_HANDLER_ERROR";
|
|
19
19
|
private config?;
|
|
20
20
|
private configProvider;
|
|
21
|
+
static create(
|
|
22
|
+
instanceOrOptions?: HttpHandler<any> | XhrHttpHandlerOptions
|
|
23
|
+
): XhrHttpHandler | HttpHandler<any>;
|
|
21
24
|
constructor(
|
|
22
25
|
options?: XhrHttpHandlerOptions | Provider<XhrHttpHandlerOptions>
|
|
23
26
|
);
|
|
@@ -48,6 +48,11 @@ export declare class XhrHttpHandler extends EventEmitter implements HttpHandler<
|
|
|
48
48
|
static readonly ERROR_IDENTIFIER = "XHR_HTTP_HANDLER_ERROR";
|
|
49
49
|
private config?;
|
|
50
50
|
private configProvider;
|
|
51
|
+
/**
|
|
52
|
+
* @returns the input if it is an HttpHandler of any class,
|
|
53
|
+
* or instantiates a new instance of this handler.
|
|
54
|
+
*/
|
|
55
|
+
static create(instanceOrOptions?: HttpHandler<any> | XhrHttpHandlerOptions): XhrHttpHandler | HttpHandler<any>;
|
|
51
56
|
constructor(options?: XhrHttpHandlerOptions | Provider<XhrHttpHandlerOptions>);
|
|
52
57
|
updateHttpClientConfig(key: keyof XhrHttpHandlerOptions, value: XhrHttpHandlerOptions[typeof key]): void;
|
|
53
58
|
httpHandlerConfigs(): XhrHttpHandlerOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/xhr-http-handler",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.465.0",
|
|
4
4
|
"description": "Provides a way to make requests using XMLHttpRequest",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"module": "./dist-es/index.js",
|
|
20
20
|
"types": "./dist-types/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@aws-sdk/types": "3.
|
|
22
|
+
"@aws-sdk/types": "3.465.0",
|
|
23
23
|
"@smithy/protocol-http": "^3.0.9",
|
|
24
24
|
"@smithy/querystring-builder": "^2.0.13",
|
|
25
25
|
"@smithy/types": "^2.5.0",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"concurrently": "7.0.0",
|
|
33
33
|
"downlevel-dts": "0.10.1",
|
|
34
34
|
"rimraf": "3.0.2",
|
|
35
|
-
"typedoc": "0.23.23",
|
|
36
35
|
"typescript": "~4.9.5"
|
|
37
36
|
},
|
|
38
37
|
"typesVersions": {
|
|
@@ -53,8 +52,5 @@
|
|
|
53
52
|
},
|
|
54
53
|
"bugs": {
|
|
55
54
|
"url": "https://github.com/aws/aws-sdk-js-v3/issues"
|
|
56
|
-
},
|
|
57
|
-
"typedoc": {
|
|
58
|
-
"entryPoint": "src/index.ts"
|
|
59
55
|
}
|
|
60
56
|
}
|