Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bobvanderlinden/harhar
A CLI tool to record, replay, manipulate and analyze HTTP archive (HAR) files
https://github.com/bobvanderlinden/harhar
Last synced: 7 days ago
JSON representation
A CLI tool to record, replay, manipulate and analyze HTTP archive (HAR) files
- Host: GitHub
- URL: https://github.com/bobvanderlinden/harhar
- Owner: bobvanderlinden
- License: mit
- Created: 2020-05-04T16:31:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T04:59:14.000Z (almost 2 years ago)
- Last Synced: 2024-04-15T00:15:40.061Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 871 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# harhar
A CLI tool to record, replay, manipulate and analyze HTTP archive files.
Some usages are:
* Reproduce HTTP traffic as recorded by a browser
* Record non-browser traffic
* Mock HTTP server based on recorded traffic
* Compare HTTP traffic of different systems## Installation
```sh
npm install -g harhar
```## Usage
```sh
harhar --help
```## Development
Install required dependencies using:
```sh
npm install
```Use the following to make the current directory be used as the `harhar` command:
```sh
npm link
```
## Commands### serverreplay
Usage: `harhar serverreplay [options]`
Run a HTTP server that replays responses from a HAR file by looking up the incoming request by specific properties. The incoming requests and outgoing responses can be recorded to a new HAR file.
* `--port `:
* `--input `:
* `--match-request-id`:
* `--ignore-hostname`:
* `--ignore-port`:
* `--match-headers `:
* `--ignore-headers `:
* `--ignore-header-casing`:
* `--ignore-header-order`:
* `--match-query-string-params `:
* `--ignore-query-string-params `:
* `--ignore-query-string-param-order`:
* `--ignore-post-data`:
* `--record `:### clientreplay
Usage: `harhar clientreplay [options]`
Replays the requests of a HAR file. The responses that were sent back can optionally be recorded to a new HAR file.
* `--input `:
* `--record `:
* `--replace-hostname `:
* `--replace-port `:### proxy
Usage: `harhar proxy [options]`
Record traffic between a HTTP client and server. This passes incoming requests towards a host and passes the resulting response back to the client.
This records incoming requests and outgoing responses.* `--listen-port `:
* `--listen-host `:
* `--connect-host `:
* `--connect-port `:
* `--record `:### diff
Usage: `harhar diff [options] `
Compares two HAR files for differences.
It does so by matching requests on specific properties. These properties can be specified using the --match-* options.
Requests that match are compared by all properties and the diff is shown for each differing entry.
Note that this does not match requests based on ordering.* `-C, --context `: Output number of lines of copied context
* `--match-request-id`: Match entries on x-request-id header of requests
* `--match-started-date-time`: Match entries on startedDateTime
* `--match-method`: Match entries on request method
* `--match-url`: Match entries on request URL
* `--match-pathname`: Match entries on pathname part of request URL
* `--match-query`: Match entries on query-string parameters
* `--match-header `: Match entries on (one or more) request header(s)### transform
Usage: `harhar transform [options]`
Transforms a HAR file and outputs the result to a new HAR file.
* `--input `:
* `--output `:
* `--ignore-headers `:
* `--ignore-query-string-params `:
* `--match-headers `:
* `--match-query-string-params `:
* `--match-multipart-headers `:
* `--ignore-multipart-headers `:
* `--normalize-header-names`:
* `--remove-query-string-from-url`:
* `--replace-hostname `:
* `--replace-port `:
* `--replace-protocol `:
* `--replace-status-text `:
* `--replace-multipart-boundary `:
* `--scrub-timings`:
* `--scrub-sizes`:
* `--sort-headers`:
* `--sort-query-string-params`:
* `--sort-multipart`:
* `--fabricate-request-ids`: Adds request ids to all requests and responses that do not already have request ids### validate
Usage: `harhar validate [options]`
Validates a HAR file.
* `--input `:
* `--require-request-header `:
* `--require-response-header `: