Module

utils/axios

Axios helpers

View Source utils/axios-helpers.js, line 1

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.

View Source utils/axios-helpers.js, line 26

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

Promise.<void>
Example
await setPiiToken(client)