Skip to content

Convert a HAR (HTTP Archive) object to a cURL command using JavaScript.

Notifications You must be signed in to change notification settings

mattcg/har-to-curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HAR to cURL

Written in JavaScript. CommonJS format. Inspired by a Python implementation.

💬 Try the web interface.

Install

Use npm:

npm install har-to-curl

Example

var harToCurl = require('har-to-curl');

var myHarString = '{"startedDateTime": "2013-02-21T16:23:17.806Z", "time": 577, "request": { "method": "GET", "url": "http://...';
var myCurlCommand;

// Passing in an object:
var myHarObject = JSON.parse(myHarString);
myCurlCommand = harToCurl(myHarObject);

// Passing in a string - will be JSON.parsed automatically:
myCurlCommand = harToCurl(myHarString);

License

Copyright © 2012 Matthew Caruana Galizia, licensed under an MIT license.

About

Convert a HAR (HTTP Archive) object to a cURL command using JavaScript.

Resources

Stars

Watchers

Forks

Packages

No packages published