Created
October 23, 2021 18:50
-
-
Save oleh-zaporozhets/ea5a8a0f7b1b4346c6492d827e1e3024 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| constructor(http: IHttp, options: ICircuitBreakerOptions) { | |
| this.http = http; | |
| this.timeout = options.timeout; | |
| this.errorHandler = options.errorHandler; | |
| this.http.instance.interceptors.request.use(this.interceptRequest.bind(this)); | |
| this.http.instance.interceptors.response.use( | |
| (response: AxiosResponse) => response, | |
| this.interceptErrorResponse.bind(this), | |
| ); | |
| } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment