Interface ReportServiceSettings

Describes the settings to connect the Web API.

Hierarchy

  • ReportServiceSettings

Properties

onRequest?: Function

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

Example

Usage example:

onRequest: (init) => init.headers.Authorization = 'security_token';
onRequestAsync?: ((init) => Promise<RequestInit>)

Type declaration

    • (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

      Usage example:

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

The security key needed to access the Web API.

Example

Usage example:

securityToken: 'security_token',
url?: string

The url to connect the Web API.

Example

Usage example (prefix only):

url: '/api/reporting' // default value

Example

Usage example (full URL):

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