(appConfig: AxiosRequestConfig)
| 35 | |
| 36 | // sets up the client with the given configuration |
| 37 | private _setupClient(appConfig: AxiosRequestConfig) { |
| 38 | const config: AxiosRequestConfig = cloneDeep(appConfig); |
| 39 | |
| 40 | config.headers = mapKeys(config.headers, (_, key) => key.toLowerCase()); |
| 41 | |
| 42 | defaults(config.headers, { |
| 43 | "content-type": "application/json", |
| 44 | }); |
| 45 | return axios.create(config); |
| 46 | } |
| 47 | |
| 48 | // sets the bearer token for the client |
| 49 | public setBearerToken(token: string) { |