@aws-sdk/xhr-http-handler
Advanced tools
Comparing version 3.460.0 to 3.465.0
@@ -23,2 +23,8 @@ "use strict"; | ||
class XhrHttpHandler extends events_1.EventEmitter { | ||
static create(instanceOrOptions) { | ||
if (typeof (instanceOrOptions === null || instanceOrOptions === void 0 ? void 0 : instanceOrOptions.handle) === "function") { | ||
return instanceOrOptions; | ||
} | ||
return new XhrHttpHandler(instanceOrOptions); | ||
} | ||
constructor(options) { | ||
@@ -25,0 +31,0 @@ super(); |
@@ -20,2 +20,8 @@ import { HttpResponse } from "@smithy/protocol-http"; | ||
export class XhrHttpHandler extends EventEmitter { | ||
static create(instanceOrOptions) { | ||
if (typeof instanceOrOptions?.handle === "function") { | ||
return instanceOrOptions; | ||
} | ||
return new XhrHttpHandler(instanceOrOptions); | ||
} | ||
constructor(options) { | ||
@@ -22,0 +28,0 @@ super(); |
@@ -21,2 +21,5 @@ import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; | ||
private configProvider; | ||
static create( | ||
instanceOrOptions?: HttpHandler<any> | XhrHttpHandlerOptions | ||
): XhrHttpHandler | HttpHandler<any>; | ||
constructor( | ||
@@ -23,0 +26,0 @@ options?: XhrHttpHandlerOptions | Provider<XhrHttpHandlerOptions> |
@@ -51,2 +51,7 @@ /// <reference types="node" /> | ||
private configProvider; | ||
/** | ||
* @returns the input if it is an HttpHandler of any class, | ||
* or instantiates a new instance of this handler. | ||
*/ | ||
static create(instanceOrOptions?: HttpHandler<any> | XhrHttpHandlerOptions): XhrHttpHandler | HttpHandler<any>; | ||
constructor(options?: XhrHttpHandlerOptions | Provider<XhrHttpHandlerOptions>); | ||
@@ -53,0 +58,0 @@ updateHttpClientConfig(key: keyof XhrHttpHandlerOptions, value: XhrHttpHandlerOptions[typeof key]): void; |
{ | ||
"name": "@aws-sdk/xhr-http-handler", | ||
"version": "3.460.0", | ||
"version": "3.465.0", | ||
"description": "Provides a way to make requests using XMLHttpRequest", | ||
@@ -22,3 +22,3 @@ "scripts": { | ||
"dependencies": { | ||
"@aws-sdk/types": "3.460.0", | ||
"@aws-sdk/types": "3.465.0", | ||
"@smithy/protocol-http": "^3.0.9", | ||
@@ -36,3 +36,2 @@ "@smithy/querystring-builder": "^2.0.13", | ||
"rimraf": "3.0.2", | ||
"typedoc": "0.23.23", | ||
"typescript": "~4.9.5" | ||
@@ -58,6 +57,3 @@ }, | ||
"url": "https://github.com/aws/aws-sdk-js-v3/issues" | ||
}, | ||
"typedoc": { | ||
"entryPoint": "src/index.ts" | ||
} | ||
} |
38723
6
568
+ Added@aws-sdk/types@3.465.0(transitive)
- Removed@aws-sdk/types@3.460.0(transitive)
Updated@aws-sdk/types@3.465.0