Skip to content

Commit

Permalink
Update request type definition and documentation to mention statusMes…
Browse files Browse the repository at this point in the history
…sage argument to httpHeaders event
  • Loading branch information
jeskew committed Mar 2, 2017
1 parent d9edd67 commit f266fec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/request.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class Request<D, E> {
* @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<D, E>) => void): Request<D, E>;
on(event: "httpHeaders", listener: (statusCode: number, headers: {[key: string]: string}, response: Response<D, E>, statusMessage: string) => void): Request<D, E>;
/**
* Adds a listener that is triggered when data is sent by the remote server.
*
Expand Down Expand Up @@ -176,4 +176,4 @@ export class Request<D, E> {
export interface Progress {
loaded: number;
total: number;
}
}
4 changes: 3 additions & 1 deletion lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<String,String>] 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)
Expand Down

0 comments on commit f266fec

Please sign in to comment.