Git Product home page Git Product logo

http-prompt's Introduction

HTTP Prompt

PyPI Build Status Coverage

HTTP Prompt is an interactive command-line HTTP client featuring autocomplete and syntax highlighting, built on HTTPie and prompt_toolkit.

http-prompt.gif

Installation

Just install it like a regular Python package:

$ pip install http-prompt

You'll probably see some permission errors if you're installing it on the system-wide Python. If that's what you want to do, you need to sudo:

$ sudo pip install http-prompt

To upgrade HTTP Prompt, do:

$ pip install -U http-prompt

Quickstart

Starting a session:

$ http-prompt http://httpbin.org

To change URL address, use cd:

> cd api/v1
> cd http://localhost/api

To add headers, querystring, or body parameters, use the syntax as in HTTPie:

> Content-Type:application/json username=john
> 'name=John Doe' apikey=abc

You can also add HTTPie options like this:

> --form --auth user:pass

To preview how HTTP Prompt is going to call HTTPie, do:

> httpie post
http --auth user:pass --form POST http://localhost/api apikey==abc username=john

To actually send a request, enter one of the HTTP methods:

> get
> head
> post
> put
> patch
> delete

To remove an existing header, querystring, body parameter, or HTTPie option:

> rm -h Content-Type
> rm -q apikey
> rm -b username
> rm -o --auth

Roadmap

  • Allow users to customize via a configuration file
  • Include more headers for autocomplete
  • Write more tests
  • Write more documentation

http-prompt's People

Contributors

eliangcs avatar karlcow avatar

Watchers

James Cloos avatar MaL 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.