Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 22 days 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 (about 1 month ago)
- Last Synced: 2024-10-28T22:19:06.849Z (about 1 month 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
[![node version](https://img.shields.io/node/v/xhr-sniffer.svg)](https://www.npmjs.com/package/xhr-sniffer)
[![npm version](https://badge.fury.io/js/xhr-sniffer.svg)](https://badge.fury.io/js/xhr-sniffer)
[![downloads count](https://img.shields.io/npm/dt/xhr-sniffer.svg)](https://www.npmjs.com/package/xhr-sniffer)
[![size](https://packagephobia.com/badge?p=xhr-sniffer)](https://packagephobia.com/result?p=xhr-sniffer)
[![license](https://img.shields.io/npm/l/xhr-sniffer.svg)](https://piecioshka.mit-license.org)
[![github-ci](https://github.com/piecioshka/xhr-sniffer/actions/workflows/testing.yml/badge.svg)](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