Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@htptp/hurl-parser

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@htptp/hurl-parser

The Hurl parser, callable from pure JS!

latest
Source
npmnpm
Version
1.6.0
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

@htptp/hurl-parser

The Hurl file parser, compiled to WASM and callable from JavaScript!

Usage

import { parse } from "@htptp/hurl-parser";

const result = parse(`
  GET http://example.com
  HTTP/* 200
`);

The returned data will be as follows

{
  "entries": [
    {
      "request": {
        "method": "GET",
        "url": "http://example.com"
      },
      "response": {
        "status": 200
      }
    }
  ]
}

The module also exports TypeScript types for these structures.

import type { Hurl } from "@htptp/hurl-parser";

const result: Hurl.Document = parse(/* ... */);

Installation

Just install to your dependencies

$ yarn add @htptp/hurl-parser    # if you use yarn
$ npm install @htptp/hurl-parser # if you use npm

And import normally

Limitations

Keywords

http

FAQs

Package last updated on 15 Mar 2022

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