Simple AF CLI HTTP client
Built with โค๏ธ by Tiaan and contributors
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.
$ npm install -g httpness
Or
$ yarn add global httpness
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:
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 |
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.
Licensed under the MIT License.