Have ideas to improve npm?Join in the discussion! »

    xhr-sniffer

    1.0.3 • Public • Published

    xhr-sniffer

    npm version downloads count travis coveralls

    Sniff HTTP requests making by XHR in browser or http module in Node.js

    Demo 🎉

    https://piecioshka.github.io/xhr-sniffer/demo/browser/

    Features

    • ✅ Display logs of XMLHttpRequests in DevTools Console
    • ✅ Display logs of http module in Node.js
    • ⛔️ Sniffing Fetch API

    Install

    npm install xhr-sniffer

    Usage

    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 test

    Code coverage

    npm run coverage

    License

    The MIT License @ 2018

    Install

    npm i xhr-sniffer

    DownloadsWeekly Downloads

    2

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    7.5 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar