bash-client
Open-source "Postman"-like tool for the CLI. It's great when developing backend APIs and you want to test Http-Get or -Post requests etc.
Installation
Linux/Mac:
bash# npm install -g bash-client
Windows:
C:\> npm install -g bash-client
Usage
Npx:
npx bash-client get http://mydomain.com/file1
Linux/Mac:
bash$ Get http://mydomain.com/file1
bash$ Post /auth/login
bash$ Get /auth/status
Windows:
C:\> bashcli.cmd get http://mydomain.com/file1
C:\> bashcli.cmd put /file2
Please notice the capital G in 'Get' for Mac/Linux, but a lowercase g when using the bashcli command directly.
Features
-
Support for Http and Https. Methods: Get, Post, Put, Patch, Head, Delete.
-
Bash-client remembers. So the first time, you need to type the whole url but then you only need to specify the endpoints.
bash$ Get http://mydomain.com/file1
bash$ Get /file2
bash$ Post /auth/login
-
It has header and cookie support (written from scratch in Typescript)
-
It saves all cookies matching your filter (by default only session cookies) and the client will send all matching cookies to the webserver.
-
You can also send custom headers (eg. JWTs) and save the server response headers that match your filter (default setting is not to save any headers).
-
When you send request bodies (Http Post, Patch, Put) it will launch the integrated text editor Termit, which lets you craft the Json data.
-
You may also send any non-Json data the same way. The client remembers (and defaults to) the last data you sent.
-
Response data is nicely formatted and it will not flood your terminal.
Documentation
Real docs will be coming shortly (it's under development), but you can run the command:
bashcli help
Or "bashcli.cmd help" on Windows. You may e-mail me directly if you need help (jonas@doctorbirch.com) but it might take a couple of days for me to respond.
Why do this kinda backend testing through the CLI?
As soon as you get used to it, it goes much faster than Postman, Thunderclient and the others because you don't need to switch between the keyboard and the mouse.
Bugs
I wrote this whole project in 13 days so there will possibly be bugs. If you find any, please let me know.
- JB