Axios helpers
- Copyright:
- 2015–2020 RewardOps Inc.
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. |
If an error is returned from auth.getToken
the
promise will reject, otherwise it will resolve.
Promise.<void>
Example
await setPiiToken(client)