corto

0.0.2 • Public • Published

corto

Corto is a command-line http client that makes its requests with superagent. Its goal is to bridge the gap between making HTTP requests using a CLI tool and making HTTP requests programmatically.

$ npm install -g corto
$ corto http://httpbin.org/headers
{
  "headers": {
    "Accept-Encoding": "gzip, deflate",
    "Cookie": "",
    "Host": "httpbin.org",
    "Connection": "close",
    "X-Request-Id": "a76ebb28-e993-4820-9b79-3488dcf90f44"
  }
}
$ corto -p http://httpbin.org/post 'test=hello'
{
  "form": {
    "test": "hello"
  },
  "origin": "184.98.162.193",
  "files": {},
  "headers": {
    "Accept-Encoding": "gzip, deflate",
    "Connection": "close",
    "Cookie": "",
    "Content-Type": "application/x-www-form-urlencoded",
    "Host": "httpbin.org",
    "X-Request-Id": "11fb8b02-d71f-44b5-b9c7-02240ea0c393",
    "Content-Length": "10"
  },
  "args": {},
  "url": "http://httpbin.org/post",
  "data": "",
  "json": null
}

TODO

  • determine the defaults and the interface for output
  • implement the rest of the request options as described in cli.js
  • implement the javascript code generator
  • document the basics of the API in this README
  • build the web page

Readme

Keywords

Package Sidebar

Install

npm i corto

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • bat-archive