1.0.5 • Published 4 years ago

har2csv v1.0.5

Weekly downloads
10
License
Apache-2.0
Repository
github
Last release
4 years ago

Har2CSV

Convert HTTP session HAR file logs into CSV format

This CLI tool provides you with an easy way to convert HAR file HTTP log entries into a flat CSV format to make it easier to analyze. The utility ignores fields that are not essential for analyzing requests/responses such as content and those that might carry private information such as cookies.

Usage

Install and run

Requires node v10.13.x or above

# Install

npm install har2csv -g

# Run

har2csv path/to/input.har path/to/output.csv

Generating a HAR file from a browser session

Example using Chrome:

  • Open the Dev Tools panel via Ctrl + Shift + i
  • Click the “Network” menu item on the top menu bar of the panel
  • The HTTP session is recorded by default, navigate to the pages / resources you're inspecting
  • Once ready to export the data, right-click anywhere on the list of items in the Network resource list and select “Save all as HAR with content”

Extracted log entry fields

Entry pathCSV column name
pagerefpageRef
startedDateTimestartedDateTime
request.methodrequestMethod
request.urlrequestUrl
request.httpVersionrequestHttpVersion
request.headerSizerequestHeaderSize
request.bodySizerequestBodySize
response.statusresponseStatus
response.content.sizeresponseContentSize
response.headers.name'content-type'responseContentType
response.headers.name'content-length'responseContentType
response.headers.name'cache-control'responseCacheControl
timings.blockedblocked
timings.dnsdns
timings.sslssl
timings.connectconnect
timings.sendsend
timings.waitwait
timings.receivereceive
timetime

Note: Entries that don't match the above fields / paths are not included in the result CSV file

WIP

  • Support TSV format
  • Add flag for excluding columns from the result
  • Output stats from the conversion e.g. # of requests, GET vs POST etc...

License

Apache 2.0

Contributors

Disclaimer

This is not an official Google product.

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago