Skip to content
A Python based HTTP Read, Eval, Print Loop inspired from http://github.com/cloudhead/http-console
Python JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
LICENSE_1_0.txt
README.markdown
http-console.py
test_server.js

README.markdown

PyHTTP-Console

Every once in a while when developing a web-app, it becomes useful to send out custom requests to the server to see how it responds in particular scenarios. Also, just accessing servers over HTTP on a command line is a nifty tool to have.

This project is a python implementation of a Read, Eval, Print Loop (similar to a Shell) which helps you work with HTTP servers easily and efficiently.

This program is inspired by Cloudhead's node.js based http-console located at http://github.com/cloudhead/http-console

QuickStart

Assuming you have CouchDB installed and running on port 5984, this is how a typical session looks like.

Usage Example

You can also use this with a Django Development server by just changing the port by issuing:

http://localhost:5984> port 8000

Features

  1. Server Navigation using a filesystem like approach: cd
  2. Server queries on relative and absolute paths using GET or POST
  3. Header highlights
  4. A node.js based HTTP echo server for testing

Other features thanks to nifty python modules:

  1. Tab completion of commands
  2. Command History

Installation

Prerequisites: termcolor and colorama

easy_install termcolor
easy_install colorama

Alternatively, if you are a pip user

pip install termcolor
pip install colorama

Get the code:

git clone http://github.com/divyekapoor/pyhttp-console.git

Or alternatively, just download the source from the Downloads section and extract it. Just run the http-console.py from wherever you may be and enjoy!

Feedback

I would love to hear from you as to the improvements that can be made to this project. Catch me on Twitter at http://twitter.com/divyekapoor and drop your thoughts. In case you encounter bugs, feel free to add an issue to the project.

Todo

  1. Tests
  2. Headers add and remove support
  3. HTTP response body colorize
  4. Update code to use the httplib2 python library to enable Keep-Alive and other goodies.
Something went wrong with that request. Please try again.