Socket
Book a DemoInstallSign in
Socket

lithttp

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

lithttp

Literate HTTP

unpublished
latest
Source
npmnpm
Version
0.0.12
Version published
Maintainers
1
Created
Source

Literate HTTP Build Status

Parse HTTP transactions into a JSON AST and back, like

HTTP, or simplified HTTP, or curl, or Apiary blueprint

into/from

[
  {
    "__type": "litHTTP_transaction",
    "request": {
      "__type": "litHTTP_request",
      "method": "GET",
      "target": {
        "__type": "request_target",
        "value": "/"
      },
      "HTTP_version": "HTTP/1.1",
      "headers": [
        {
          "name": "User-Agent",
          "value": "curl/7.30.0"
        },
        {
          "name": "Accept",
          "value": "*/*"
        }
      ],
      "body": null
    },
    "response": {
      "__type": "litHTTP_response",
      "HTTP_version": "HTTP/1.1",
      "status_code": 200,
      "reason_phrase": "OK",
      "headers": [
        {
          "name": "Content-Type",
          "value": "text/plain"
        }
      ],
      "body": "foo"
    }
  }
]

Install

npm install lithttp

CLI Usage

  • lithttp-to-ast parses into the JSON AST
  • lithttp-from-ast parses from the JSON AST
curl -s https://raw.githubusercontent.com/for-GET/literate-http/master/README.http.md | \
  lithttp-to-ast

curl -s https://raw.githubusercontent.com/for-GET/literate-http/master/README.http.simplified.md | \
  lithttp-to-ast

curl -s https://raw.githubusercontent.com/for-GET/literate-http/master/README.curl.md | \
  lithttp-to-ast curl

curl -s https://raw.githubusercontent.com/for-GET/literate-http/master/README.curl-trace.md | \
  lithttp-to-ast curl-trace

curl -s https://raw.githubusercontent.com/for-GET/literate-http/master/README.apib.md | \
  lithttp-to-ast apib

JS Usage

TBD (to be documented; see index)

License

UNLICENSE

Keywords

literate

FAQs

Package last updated on 02 Jun 2014

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