🌏 httpness 🌏
Simple AF CLI HTTP client
Built with ❤︎ by Tiaan and contributors
Table of Contents
About
This cli module is a simple HTTP client similar to httpie, but with a lot less functionality. It is build on top of node-fetch and uses prettyjson to provide nice formatting.
Install
$ npm install -g httpness
Or
$ yarn add global httpness
Usage
After the module has been installed globally, it can be called from the terminal:
$ httpness --url=https://jsonplaceholder.typicode.com/posts/1
This will output:
It also supports other HTTP methods like POST
:
$ httpness --url=https://jsonplaceholder.typicode.com/posts --method=POST --body={title: 'Hi', body: 'Friend', userId: 1}
This will output:
API
The following argument flags are supported:
Flag | Description | Default | Example |
---|---|---|---|
--url , -url , --u or -u
|
The URL to make request to. Required | - | --url=https://jsonplaceholder.typicode.com/posts/1 |
--method , -method , --m or -m
|
The HTTP method to use. | GET |
--method=POST |
--body , -body , --b or -b
|
Body to send with request. | '' |
--body={title: 'Hi', body: 'Friend', userId: 1} |
--headers , -headers , --h or -h
|
Headers to send with request. | {} |
--headers={Content-Type: 'application/json; charset=utf-8'} |
--credentials , -credentials , --c or -c
|
Credentials to send with request. | '' |
--credentials=same-origin |
Contribute
Contributions are welcome. Please open up an issue or create PR if you would like to help out.
Note: If editing the README, please conform to the standard-readme specification.
License
Licensed under the MIT License.