1.7.11 • Published 11 months ago

@mimik/request-helper v1.7.11

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
11 months ago

request-helper

Example

const { getCorrelationId } = require('@mimik/request-helper');

request-helper~getCorrelationId(request) ⇒ UUID.<string>

Get the correlationId from the request. If it does not exist, a new correlationId step 0 and time will be created. Add step if it does not exist, add date if it does not exist. Increment step is it exist, and set step to 0 if step is not a number.

Kind: inner method of request-helper
Returns: UUID.<string> - The correlationId.
Category: sync

ParamTypeDescription
requestobjectThe request from which to extract the correlationId or a string

request-helper~getUserAgent(request) ⇒ string

Get the userAgent from the request.

Kind: inner method of request-helper
Returns: string - The user agent from the request.
Category: sync

ParamTypeDescription
requestobjectThe request from which to extract the correlationId or a string

request-helper~setUserAgent() ⇒ string

The following environment variable are being optionnaly used:

Env variable nameDescriptionDefaultComments
SERVER_TYPEtype of the server instance that makes the callgenericfor defining the agent
SERVER_VERSIONversion of the server instance that makes the call1.0for defining the agent
SERVER_IDid of the server instance that makes the callgenericfor defining the agent

Kind: inner method of request-helper
Returns: string - The user agent to be added to the request.
Category: sync

1.7.11

11 months ago

1.7.10

2 years ago

1.7.9

2 years ago

1.7.8

2 years ago

1.7.7

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.7.4

3 years ago

1.7.3

4 years ago

1.3.0

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

7 years ago

1.2.0

7 years ago