Module: utils/axios

Axios helpers

Source:

Methods

(async, protected, inner) setPiiToken(client) → {Promise.<void>}

Set axios' default auth header to OAuth Bearer Token from v5 RO API

Parameters:
Name Type Description
client axios.AxiosInstance.<void>

Avoids polluting the global axios object.

Source:
Returns:

If an error is returned from auth.getToken the promise will reject, otherwise it will resolve.

Type
Promise.<void>
Example
await setPiiToken(client)