https://github.com/piecioshka/xhr-sniffer
:hammer: Sniff HTTP requests making by XHR in the browser or HTTP module in Node.js
https://github.com/piecioshka/xhr-sniffer
debugging http sniffer xhr
Last synced: 5 months ago
JSON representation
:hammer: Sniff HTTP requests making by XHR in the browser or HTTP module in Node.js
- Host: GitHub
- URL: https://github.com/piecioshka/xhr-sniffer
- Owner: piecioshka
- Created: 2018-07-17T11:29:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T21:05:08.000Z (6 months ago)
- Last Synced: 2024-10-28T22:19:06.849Z (6 months ago)
- Topics: debugging, http, sniffer, xhr
- Language: JavaScript
- Homepage: https://piecioshka.github.io/xhr-sniffer/demo/browser/
- Size: 277 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-network-stuff - **8**星
README
# xhr-sniffer
[](https://www.npmjs.com/package/xhr-sniffer)
[](https://badge.fury.io/js/xhr-sniffer)
[](https://www.npmjs.com/package/xhr-sniffer)
[](https://packagephobia.com/result?p=xhr-sniffer)
[](https://piecioshka.mit-license.org)
[](https://github.com/piecioshka/xhr-sniffer/actions/workflows/testing.yml)🔨 Sniff HTTP requests making by XHR in the browser or HTTP module in Node.js
## Preview 🎉
## Features
* ✅ Display logs of `XMLHttpRequests` in DevTools Console
* ✅ Display logs of `http` module in `Node.js`
* ⛔️ Sniffing `Fetch API`## Install
```bash
npm install xhr-sniffer
```## Usage
### Sniff requests in `Node.js`
```javascript
const xhrSniffer = require('xhr-sniffer');xhrSniffer.install();
// do XHR requests
xhrSniffer.uninstall();
```### Sniff requests in `browser`
Attach files in `` tag:
```html
```
Next, make some XMLHttpRequests requests.
## Unit tests
```bash
npm test
```## Code coverage
```bash
npm run coverage
```## License
[The MIT License](https://piecioshka.mit-license.org) @ 2018