Fork me on GitHub

Class request.AuthenticatedRawRequest


Extends request.Request.

Defined in: request.js.

Class Summary
Constructor Attributes Constructor Name and Description
 

Authenticated raw request wrapper class.

Field Summary
Field Attributes Field Name and Description
 

Authentication object.

 

HTTP method verb.

 

Real HTTP request object.

Method Summary
Method Attributes Method Name and Description
 
getMeta(response)

Return separate headers, cloud headers and metadata from headers.

 
setEncoding(encoding)

Set request encoding.

 
setHeader(name, value)

Set header.

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

Authenticated raw request wrapper class.

Parameters:
{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.
Field Detail
{Authentication} auth

Authentication object.


{string} method

HTTP method verb.


{http.ClientRequest} realRequest

Real HTTP request object.

Method Detail
{Object} getMeta(response)

Return separate headers, cloud headers and metadata from headers.

Parameters:
{HttpResponse} response
Response object.
Returns:
{Object} Object of headers, cloudHeaders, metadata.

setEncoding(encoding)

Set request encoding.

Parameters:
encoding

setHeader(name, value)

Set header.

Parameters:
name
value