8000 GitHub - shtakai/hopp-cli: HTTP client like cURL / HTTPie and a CLI client for https://hoppscotch.io
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

shtakai/hopp-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hoppscotch CLI hoppscotch Go Report Card

Send HTTP requests from terminal. An alternative to cURL, httpie ⚡️

Installation

From Script

$ sh -c "$(curl -sL https://git.io/getpwcli)"

From Source

  • Clone the repo
$ git clone https://github.com/hoppscotch/hopp-cli.git
  • Build and install
$ make

$ sudo make install

From Binary

  • You can find the Binaries in Gzipped form from the Releases page
    Supports
  • Linux(x64,x86)
  • Mac(x64)
  • Windows(x64,x86)

Homebrew

Install by brew install athul/tap/hopp-cli

IMPORTANT: Not tested on Windows, please leave your feedback/bugs in the Issues section

Usages

Putting Simply: Just pass the URL to the request method

Basic

  • GET : hopp-cli get <url>
  • POST: hopp-cli post <url>
  • PATCH: hopp-cli patch <url>
  • PUT : hopp-cli put <url>
  • DELETE: hopp-cli delete <url>

Example for a POST request: hopp-cli post https://reqres.in/api/users/2 -c js -b '{"name": "morp","job": "zion resident"}

Extra

SEND: This can be used to test multiple endpoints from the hoppscotch-collection.json file. The output will only be the statuscode.
Example : hopp-cli send <PATH to hoppscotch collection.json>
o/p:

There are 3 Authentication Flags

(optional)

  • -t or --token for a Bearer Token for Authentication
  • -u for the Username in Basic Auth
  • -p for the password in Basic Auth

There are 2 flags especially for the data management requests like POST,PUT,PATCH and DELETE

  • -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

About

HTTP client like cURL / HTTPie and a CLI client for https://hoppscotch.io

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 94.3%
  • Makefile 5.7%
0