[]
        
(Showing Draft Content)

ReportServiceSettings

Interface: ReportServiceSettings

Describes the settings to connect the Web API.

Properties

onRequest?

optional onRequest: Function;

Callback before any request. Allows to change RequestInit object before fetch request - https://fetch.spec.whatwg.org/#requestinit.

Example

   onRequest: (init) => init.headers.Authorization = 'security_token';

onRequestAsync()?

optional onRequestAsync: (init) => Promise<RequestInit>;

Callback before any request. Allows to change RequestInit object before fetch request - https://fetch.spec.whatwg.org/#requestinit.

Parameters

init

RequestInit

Returns

Promise<RequestInit>

Example

   onRequestAsync: (init) => {
       return new Promise((resolve, reject) => {
           init.headers.Authorization = 'security_token';
           return resolve(init);
   });

securityToken?

optional securityToken: string;

The security key needed to access the Web API.

Example

securityToken: 'security_token',

url?

optional url: string;

The url to connect the Web API.

Examples

url: '/api/reporting' // default value
url: 'http:example.com/api/reporting'