\r\n

51Degrees Pipeline Node.js  4.4

51Degrees Pipeline for Node.js

Evidence Class Reference

Detailed Description

Storage of evidence on a flowData object.

Examples
usageSharing/usageSharing.js.

Public Member Functions

 constructor (flowData)
Constructor for evidence. More...
 add (key, value)
Add a piece of evidence to flowData. More...
 addObject (evidenceObject)
Add a piece of evidence to flowData as an object. More...
 addFromRequest (request)
Add evidence to flowData from an HTTP request This helper automatically adds evidence: headers, cookies, protocol, IP and query params. More...
 get (key)
Get a piece of evidence. More...
 getAll ()
Get all evidence. More...

Member Function Documentation

◆ add()

Evidence::add (   key,
  value  
)
inline

Add a piece of evidence to flowData.

Parameters
{string} - key evidence key to add
{*} - value value of evidence key

◆ addFromRequest()

Evidence::addFromRequest (   request )
inline

Add evidence to flowData from an HTTP request This helper automatically adds evidence: headers, cookies, protocol, IP and query params.

Parameters
{object} - request an HTTP request object
Returns
{Evidence} return updated evidence

◆ addObject()

Evidence::addObject (   evidenceObject )
inline

Add a piece of evidence to flowData as an object.

Parameters
{object} - evidenceObject key value map of evidence
{string} - evidenceObject.key evidencekey
{*} - evidenceObject.value evidence value

◆ constructor()

Evidence::constructor (   flowData )
inline

Constructor for evidence.

Parameters
{FlowData} - flowData FlowData to add the evidence to

◆ get()

Evidence::get (   key )
inline

Get a piece of evidence.

Parameters
{string} - key evidence key to retreive
Returns
{*} the evidence value

◆ getAll()

Evidence::getAll ( )
inline

Get all evidence.

Returns
{object} all evidence