This class encapsulates the response informationfrom a service request operation sent throughAWS.Request.The response object has two main properties for getting informationback from a request:
data propertyTheresponse.data property contains the serialized object dataretrieved from the service request. For instance, for anAmazon DynamoDBlistTables method call, the response data mightlook like:
> resp.data{ TableNames: [ 'table1', 'table2', ... ] }Thedata property can be null if an error occurs (see below).
error propertyIn the event of a service error (or transfer error), theresponse.error property will be filled with the givenerror data in the form:
{ code: 'SHORT_UNIQUE_ERROR_CODE', message: 'Some human readable error message' }In the case of an error, thedata property will benull.Note that if you handle events that can be in a failure state,you should always check whetherresponse.error is setbefore attempting to access theresponse.data property.
See Also:
The de-serialized response data from the service.
An structure containing information about a service or networking error.
The unique request ID associated with the response.
The number of redirects that were followed before the request was completed.
The number of retries that were attempted before the request was completed.
The raw HTTP response object containing the response headers and body information from the server.
Whether more pages of data can be returned by further requests.
Creates a new request for the next page of response data, calling the callback with the page data if a callback is provided.
Inside of aAWS.Request~httpData event, thisproperty contains a single raw packet instead of thefull de-serialized service response.
Returns the de-serialized response datafrom the service.
Returns:
the de-serialized response datafrom the service.
This attribute is only filled if a service ornetworking error occurs.
An structure containing information about a serviceor networking error.
Returns:
Returns the raw HTTP response objectcontaining the response headers and body informationfrom the server.
Returns:
the raw HTTP response objectcontaining the response headers and body informationfrom the server.
Returns the number of redirects that werefollowed before the request was completed.
Returns:
the number of redirects that werefollowed before the request was completed.
Returns the unique request ID associated with the response.Log this value when debugging requests for AWS support.
Returns:
the unique request ID associated with the response.Log this value when debugging requests for AWS support.
Returns the number of retries that wereattempted before the request was completed.
Returns:
the number of retries that wereattempted before the request was completed.
Returns whether more pages of data can be returned by furtherrequests.
Returns:
whether more pages of data can be returned by furtherrequests
Since:
v1.4.0
Creates a new request for the next page of response data, calling thecallback with the page data if a callback is provided.
Callback (callback):
Called when a page of data is returned from the next request.
Parameters:
an error object, if an error occurred in the request
the next page of data, or null, if there are nomore pages left.
Returns:
the request object for the next page of data
if no callback is provided and there are no pages leftto retrieve.
Since:
v1.4.0