Axios helpers
- Copyright:
- 2015–2020 RewardOps Inc.
- 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)