Giter VIP home page Giter VIP logo

hopp-cli's Introduction

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/athul/pwcli
  • 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/pwcli

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 : 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"}

Extra

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:

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

hopp-cli's People

Contributors

athul avatar gbmor avatar avelino avatar liyasthomas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.