@loganbussey/xhr-intercept
v1.0.0
Published
A small utility to intercept in-flight XHR requests and to change the URL before they are sent. Useful for modifying the API endpoint URLs of externally loaded tracking scripts if running your own proxy. E.g. [@loganbussey/change-segment-metric-host](http
Downloads
2
Readme
XHR Intercept
A small utility to intercept in-flight XHR requests and to change the URL before they are sent. Useful for modifying the API endpoint URLs of externally loaded tracking scripts if running your own proxy. E.g. @loganbussey/change-segment-metric-host
Installation & Usage
NPM
$ npm install @loganbussey/xhr-intercept --save
import xhrIntercept from '@loganbussey/xhr-intercept';
xhrIntercept('api.foo.com', 'api.bar.com');