Socket
Book a DemoInstallSign in
Socket

curl-as-har-request

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curl-as-har-request

Turn a Curl command string into a HAR request object

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

curl-as-har-request

A JS library to turn a Curl command string into a HAR request object

This library is designed to provide access to a standard model of the core data of a request from a curl command. It supports:

  • Basic parameters like method, url & default headers (e.g. Host & Accept)
  • Body details, including multipart form bodies, URL encoded bodies, and JSON bodies
  • Cookie parameters
  • HTTP basic authentication parameters
  • Multiple semi-colon separated commands in one string
  • HTTP version negotiation with --http2
  • Accepting compressed responses with --compressed
  • Correctly parsing shell strings with escaping etc

There are a few HAR features that are not supported:

  • Exposing cookies in the cookies HAR property - instead these are just included in the headers property
  • Exposing query params in the queryString HAR property - instead these are just included in the query string of the url property
  • headerSize and bodySize

If you find any cases that are not parsed correctly, please open an issue or a pull request.

Keywords

curl

FAQs

Package last updated on 24 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts