ajax-intercept
v1.0.1
Published
ajax global hook
Downloads
21
Readme
Ajax-Intercepter
global AJax hook
Usage
import AjaxHook from 'ajax-interceptor'
const hook = new AjaxHook({
open (...arg) {
if (arg[1] === 'http://127.0.0.1:8080/xhr2')
arg[1] = 'http://127.0.0.1:8080/xhr3'
return arg
}
})
// To remove the interceptor
hook.close()- All xhr instance property support
- Very simple code
