@aws-sdk/xhr-http-handler
Advanced tools
Comparing version 3.226.0 to 3.249.0
@@ -68,3 +68,6 @@ "use strict"; | ||
}); | ||
xhr.addEventListener("error", reject); | ||
xhr.addEventListener("error", (err) => { | ||
const error = new Error(XhrHttpHandler.ERROR_IDENTIFIER + ": " + err); | ||
reject(error); | ||
}); | ||
xhr.addEventListener("timeout", () => { | ||
@@ -161,2 +164,3 @@ reject(new Error("XMLHttpRequest timed out.")); | ||
XhrHttpHandler.EVENTS = EVENTS; | ||
XhrHttpHandler.ERROR_IDENTIFIER = "XHR_HTTP_HANDLER_ERROR"; | ||
const isForbiddenRequestHeader = (header) => { | ||
@@ -163,0 +167,0 @@ header = header.toLowerCase(); |
@@ -65,3 +65,6 @@ import { HttpResponse } from "@aws-sdk/protocol-http"; | ||
}); | ||
xhr.addEventListener("error", reject); | ||
xhr.addEventListener("error", (err) => { | ||
const error = new Error(XhrHttpHandler.ERROR_IDENTIFIER + ": " + err); | ||
reject(error); | ||
}); | ||
xhr.addEventListener("timeout", () => { | ||
@@ -157,2 +160,3 @@ reject(new Error("XMLHttpRequest timed out.")); | ||
XhrHttpHandler.EVENTS = EVENTS; | ||
XhrHttpHandler.ERROR_IDENTIFIER = "XHR_HTTP_HANDLER_ERROR"; | ||
const isForbiddenRequestHeader = (header) => { | ||
@@ -159,0 +163,0 @@ header = header.toLowerCase(); |
@@ -18,2 +18,3 @@ import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http"; | ||
static readonly EVENTS: XhrHttpHandlerEvents; | ||
static readonly ERROR_IDENTIFIER = "XHR_HTTP_HANDLER_ERROR"; | ||
private config?; | ||
@@ -20,0 +21,0 @@ private readonly configProvider; |
@@ -48,2 +48,3 @@ /// <reference types="node" /> | ||
static readonly EVENTS: XhrHttpHandlerEvents; | ||
static readonly ERROR_IDENTIFIER = "XHR_HTTP_HANDLER_ERROR"; | ||
private config?; | ||
@@ -50,0 +51,0 @@ private readonly configProvider; |
{ | ||
"name": "@aws-sdk/xhr-http-handler", | ||
"version": "3.226.0", | ||
"version": "3.249.0", | ||
"description": "Provides a way to make requests using XMLHttpRequest", | ||
@@ -5,0 +5,0 @@ "scripts": { |
36324
515