HTTP Immediate – An Interactive Command Line HTTP Consumer


Get real time updates directly on you device, subscribe now.

HTTP Immediate (or HTTP-prompt) is an interactive command-line HTTP consumer constructed on HTTPie and prompt_toolkit, that includes autocomplete and syntax highlighting. It additionally helps auto cookies, OpenAPI/Swagger integration in addition to Unix-like pipelines and output redirection. As well as, it comes with greater than 20 themes that you should use.

HTTP Prompt HTTP Client for LinuxHTTP Prompt HTTP Client for Linux

HTTP Immediate HTTP Consumer for Linux

On this article, we’ll clarify tips on how to set up and briefly use HTTP-prompt in Linux.

How one can Set up HTTP Immediate in Linux

You possibly can set up HTTP-prompt similar to an everyday Python package deal utilizing PIP command as proven.

$ pip set up http-prompt

You’ll seemingly get some permission errors in case you are making an attempt to put in HTTP-prompt on the system-wide Python. It isn’t suggested, but when that is what you wish to do, simply use sudo command to realize root privileges as proven.

$ sudo pip set up http-prompt

Alternatively, you should use the –user possibility to put in the package deal into person house listing as follows:

$ pip set up –user http-prompt

To improve HTTP Immediate, do:

$ pip set up -U http-prompt

How one can Use HTTP Immediate in Linux

To begin a session, merely run the http-prompt command as proven.

Begin with the final session or http://localhost:8000
$ http-prompt

Begin with the given URL
$ http-prompt http://localhost:3000

Begin with some preliminary choices
$ http-prompt localhost:3000/api –auth person:go username=anyone

Start HTTP PromptStart HTTP Prompt

Begin HTTP Immediate

After beginning a session, you’ll be able to kind instructions interactively as proven within the following screenshot.

HTTP Prompt Command UsageHTTP Prompt Command Usage

HTTP Immediate Command Utilization

To preview how HTTP Immediate goes to name HTTPie, run the next command.

> httpie put up

Preview How HTTPie is Called in HTTP PromptPreview How HTTPie is Called in HTTP Prompt

Preview How HTTPie is Known as in HTTP Immediate

You possibly can ship an HTTP request, enter one of many HTTP strategies as proven.

> head
> get
> put up
> put
> patch
> delete

Run HTTP MethodsRun HTTP Methods

Run HTTP Strategies

It’s attainable so as to add headers, query-string, or physique parameters, use the syntax as in HTTPie. Listed here are some examples:

# set header
> Content material-Sort:utility/json

# querystring parameter
> web page==5

# physique parameters
> username=tecmint
> full_name=’Tecmint HowTos’

# physique parameters in uncooked JSON
> quantity:=45239
> is_ok:=true
> names:=[“tecmint”,”howtos”]
> person:=”

# write the whole lot in a single line
> Content material-Sort:utility/json web page==5 username=tecmint

It’s also possible to add HTTPie choices as proven.

> –form –auth person:go
> –verify=no
> –form –auth person:go username=tecmint Content material-Sort:utility/json

To reset the session (clear all parameters and choices) or exit a session, run:

> rm * #reset session
> exit #exit session

For extra data and utilization examples, see the HTTP-prompt documentation at:

That’s all! HTTP Immediate makes an ideal companion for HTTPie. We’d love to listen to from you. Share your ideas or ask questions on HTTP-prompt by way of the suggestions kind beneath.

Source link

Leave A Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More