1.0.1 • Published 6 years ago

ajax-intercept v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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

License

MIT

1.0.1

6 years ago

1.0.0

6 years ago