Send HTTP requests from terminal. An alternative to cURL, httpie ⚡️
$ sh -c "$(curl -sL https://git.io/getpwcli)"
- Clone the repo
$ git clone https://github.com/athul/pwcli
- Build and install
$ make
$ sudo make install
- You can find the Binaries in Gzipped form from the Releases page
Supports - Linux(x64,x86)
- Mac(x64)
- Windows(x64,x86)
Install by brew install athul/tap/pwcli
IMPORTANT: Not tested on Windows, please leave your feedback/bugs in the Issues section
Putting Simply: Just pass the URL to the request method
- GET :
pwcli get <url>
- POST:
pwcli post <url>
- PATCH:
pwcli patch <url>
- PUT :
pwcli put <url>
- DELETE:
pwcli delete <url>
Example for a POST request:
pwcli post https://reqres.in/api/users/2 -c js -b '{"name": "morp","job": "zion resident"}
SEND: This can be used to test multiple endpoints from the hoppscotch-collection.json
file. The output will only be the statuscode
.
Example : pwcli send <PATH to hoppscotch collection.json>
o/p:
(optional)
-t
or--token
for a Bearer Token for Authentication-u
for theUsername
in Basic Auth-p
for thepassword
in Basic Auth
-
-c
or--ctype
for the Content Type -
-b
or--body
for the Data Body, this can be of json, html or plain text based on the request.Enclose the body in Single Quotes(')
Content Types can be of
html
: text/html
js
: application/json
xml
: application/xml
plain
: text/plain