(url: string, data: S, config?: AxiosRequestConfig)
| 43 | } |
| 44 | |
| 45 | post<S, T>(url: string, data: S, config?: AxiosRequestConfig): Promise<void | AxiosResponse<T>> { |
| 46 | return axios.post<T>(url, data, this.makeRequestConfig(config)).catch((err: AxiosError) => { |
| 47 | if (err.response != null && err.response.status === 401) { |
| 48 | this.jwt.revokeToken(); |
| 49 | return; |
| 50 | } |
| 51 | throw err; |
| 52 | }); |
| 53 | } |
| 54 | |
| 55 | put<S, T>(url: string, data: S, config?: AxiosRequestConfig): Promise<void | AxiosResponse<T>> { |
| 56 | return axios.put<T>(url, data, this.makeRequestConfig(config)).catch((err: AxiosError) => { |
no test coverage detected