1.0.7 ⢠Published 1 year ago
xhr-sniffer v1.0.7
xhr-sniffer
šØ Sniff HTTP requests making by XHR in the browser or HTTP module in Node.js
Preview š
https://piecioshka.github.io/xhr-sniffer/demo/browser/
Features
- ā
Display logs of
XMLHttpRequestsin DevTools Console - ā
Display logs of
httpmodule inNode.js - āļø Sniffing
Fetch API
Install
npm install xhr-snifferUsage
Sniff requests in Node.js
const xhrSniffer = require('xhr-sniffer');
xhrSniffer.install();
// do XHR requests
xhrSniffer.uninstall();Sniff requests in browser
Attach files in <head> tag:
<script src="xhr-sniffer/src/common.js"></script>
<script src="xhr-sniffer/src/browser.js"></script>Next, make some XMLHttpRequests requests.
Unit tests
npm testCode coverage
npm run coverageLicense
The MIT License @ 2018