Skip to content

Reads GET requests from HAR file and converts them into JS fetch script

Notifications You must be signed in to change notification settings

g-otn/har-to-js-download-snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

har-to-js-download-snippet

This script reads an HAR file for GET requests and prints their URLs into javascript code. When the code is executed in the browser, it will fetch the URLs, zip each response data and download the generated zip.

Instructions

Requirements: Git and Node.js

  1. Clone the repository:
git clone https://github.com/g-otn/har-to-js-download-snippet.git
  1. Move your .har file to the repository folder and rename it to file.json

  2. (Optional) Edit the index.js file and modify the options at the beggining of the file

    • If the FETCH_LIBS option is set to true, install the dependencies by running: npm i
  3. Run the index.js file to generate your snippet:

node .
  1. The snippet will be generated at snippet.js. You can use it by, for example, pasting the file content into the browser console

About

Reads GET requests from HAR file and converts them into JS fetch script

Topics

Resources

Stars

Watchers

Forks