Fork me on GitHub

Class request.AuthenticatedRequest

Extends request.Request.

Defined in: request.js.

Class Summary
Constructor Attributes Constructor Name and Description

Authenticated request wrapper class.

Method Summary
Method Attributes Method Name and Description
processResults(data, response)

Process data.

Methods borrowed from class request.Request:
Events borrowed from class request.Request:
end, error
Class Detail
request.AuthenticatedRequest(auth, options)

Authenticated request wrapper class.

Note: Accumulates data for final 'end' event instead of passing through via typical 'data' events.

{base.Authentication} auth
Authentication object.
{Object} options
Options object.
{string} options.method Optional
HTTP method (verb).
{string} options.path Optional
HTTP path.
{Object} options.params Optional
HTTP path parameters.
{Object} options.headers Optional
HTTP headers.
{Object} options.cloudHeaders Optional
Cloud provider headers to add.
{Object} options.metadata Optional
Cloud metadata to add.
{string} options.encoding Optional
Response encoding.
{Function} options.errorFn Optional
errorFn(err, request, [response]) Error handler (stops further emission).
{Function} options.resultsFn Optional
resultsFn(results, request, [response]) Successful results data transform.
Method Detail
processResults(data, response)

Process data.

Also emits 'end' event on processed data.