* Performs requests to the downstream server * * @private - Do not call this method directly, * it uses client-specific arguments and responses! * * @param {AxiosRequestConfig} requestConfig * @returns {AxiosResponse}
(requestConfig)
| 57 | * @returns {AxiosResponse} |
| 58 | */ |
| 59 | async request (requestConfig) { |
| 60 | const reqPromise = axios(requestConfig); |
| 61 | this._activeRequests.push(reqPromise); |
| 62 | try { |
| 63 | return await reqPromise; |
| 64 | } finally { |
| 65 | _.pull(this._activeRequests, reqPromise); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | getActiveRequestsCount () { |
| 70 | return this._activeRequests.length; |