* If the request/response interceptor has been locked, * the new request/response will enter a queue. otherwise, it will be performed directly. * @param [promise] if the promise exist, means the interceptor is locked.
(promise, callback)
| 574 | * @param [callback] |
| 575 | */ |
| 576 | function enqueueIfLocked(promise, callback) { |
| 577 | if (promise) { |
| 578 | promise.then(function () { |
| 579 | callback(); |
| 580 | }); |
| 581 | } else { |
| 582 | callback(); |
| 583 | } |
| 584 | } |
| 585 | |
| 586 | // make the http request |
| 587 | function makeRequest(options) { |