mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
docs(core/InterceptorManager)
This commit is contained in:
@@ -28,6 +28,8 @@ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
|
|||||||
* Remove an interceptor from the stack
|
* Remove an interceptor from the stack
|
||||||
*
|
*
|
||||||
* @param {Number} id The ID that was returned by `use`
|
* @param {Number} id The ID that was returned by `use`
|
||||||
|
*
|
||||||
|
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
||||||
*/
|
*/
|
||||||
InterceptorManager.prototype.eject = function eject(id) {
|
InterceptorManager.prototype.eject = function eject(id) {
|
||||||
if (this.handlers[id]) {
|
if (this.handlers[id]) {
|
||||||
@@ -37,6 +39,8 @@ InterceptorManager.prototype.eject = function eject(id) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear all interceptors from the stack
|
* Clear all interceptors from the stack
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
InterceptorManager.prototype.clear = function clear() {
|
InterceptorManager.prototype.clear = function clear() {
|
||||||
if (this.handlers) {
|
if (this.handlers) {
|
||||||
@@ -51,6 +55,8 @@ InterceptorManager.prototype.clear = function clear() {
|
|||||||
* interceptors that may have become `null` calling `eject`.
|
* interceptors that may have become `null` calling `eject`.
|
||||||
*
|
*
|
||||||
* @param {Function} fn The function to call for each interceptor
|
* @param {Function} fn The function to call for each interceptor
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
InterceptorManager.prototype.forEach = function forEach(fn) {
|
InterceptorManager.prototype.forEach = function forEach(fn) {
|
||||||
utils.forEach(this.handlers, function forEachHandler(h) {
|
utils.forEach(this.handlers, function forEachHandler(h) {
|
||||||
|
|||||||
Reference in New Issue
Block a user