We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Module: AWS.EventListeners.Core

Defined in:
lib/event_listeners.js

Property Summary collapse

Property Details

HTTP_DATAFunction (readonly)

A request listener that reads data from the HTTP connection in order to build the response data. Handles the 'httpData' Request event. Remove this handler if you are overriding the 'httpData' event and do not want extra data processing and buffering overhead.

Examples:

Disabling default data processing

var listener = AWS.EventListeners.Core.HTTP_DATA;
request.removeListener('httpData', listener);

SENDFunction (readonly)

A request listener that initiates the HTTP connection for a request being sent. Handles the 'send' Request event

Examples:

Replacing the HTTP handler

var listener = AWS.EventListeners.Core.SEND;
request.removeListener('send', listener);
request.on('send', function(response) {
  customHandler.send(response);
});

VALIDATE_CREDENTIALSFunction (readonly)

A request listener that validates whether the request is being sent with credentials. Handles the 'validate' Request event

Examples:

Sending a request without validating credentials

var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS;
request.removeListener('validate', listener);

VALIDATE_PARAMETERSFunction (readonly)

A request listener that validates input parameters in a request. Handles the 'validate' Request event

Examples:

Sending a request without validating parameters

var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS;
request.removeListener('validate', listener);

Disable parameter validation globally

AWS.EventListeners.Core.removeListener('validate',
  AWS.EventListeners.Core.VALIDATE_REGION);

VALIDATE_REGIONFunction (readonly)

A request listener that validates whether the region is set for a request. Handles the 'validate' Request event

Examples:

Sending a request without validating region configuration

var listener = AWS.EventListeners.Core.VALIDATE_REGION;
request.removeListener('validate', listener);