ajax-intercept

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i ajax-intercept

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

2.59 kB

Total Files

4

Last publish

Collaborators

  • garychang