From f266fec4cfab95c88adf638bde630af326336caa Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Wed, 1 Mar 2017 16:56:00 -0800 Subject: [PATCH] Update request type definition and documentation to mention statusMessage argument to httpHeaders event --- lib/request.d.ts | 4 ++-- lib/request.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/request.d.ts b/lib/request.d.ts index 1fc2bfad62..ea3ded7264 100644 --- a/lib/request.d.ts +++ b/lib/request.d.ts @@ -122,7 +122,7 @@ export class Request { * @param {string} event - httpHeaders: triggered when headers are sent by the remote server. * @param {function} listener - Callback to run when the headers are sent by the remote server. */ - on(event: "httpHeaders", listener: (statusCode: number, headers: {[key: string]: string}, response: Response) => void): Request; + on(event: "httpHeaders", listener: (statusCode: number, headers: {[key: string]: string}, response: Response, statusMessage: string) => void): Request; /** * Adds a listener that is triggered when data is sent by the remote server. * @@ -176,4 +176,4 @@ export class Request { export interface Progress { loaded: number; total: number; -} \ No newline at end of file +} diff --git a/lib/request.js b/lib/request.js index 0bc1bd753b..6b58fdec19 100644 --- a/lib/request.js +++ b/lib/request.js @@ -246,11 +246,13 @@ fsm.setupStates(); * * @!group HTTP Events * - * @!event httpHeaders(statusCode, headers, response) + * @!event httpHeaders(statusCode, headers, response, statusMessage) * Triggered when headers are sent by the remote server * @param statusCode [Integer] the HTTP response code * @param headers [map] the response headers * @param (see AWS.Request~send) + * @param statusMessage [String] A status message corresponding to the HTTP + * response code * @context (see AWS.Request~send) * * @!event httpData(chunk, response)