What is HttpShell FOR LINUX?


HttpShell


HttpShell is a cool tool that lets you send HTTP commands to a web server or REST API without breaking a sweat. Think of it like chatting with your server!



Easy Commands for Everyone


You can easily issue HTTP commands like HEAD, GET, POST, PUT, and DELETE. What’s great about it is that you get visual feedback, making debugging REST services way more interactive than using cURL.



Treat Servers Like Filesystems


With HttpShell, you can treat the server as if it's a filesystem. For example:


$ httpsh http://api.twitter.com/a/statuses
api.twitter.com:/1/statuses > get public_timeline.json

This will give you a response like:


HTTP/1.1 200 OK
> content-length: 40945
> vary: Accept-Encoding
> x-transaction-mask: a6183ffa5f8ca943ff1b53b5644ef1140f40ebd7
...


Familiar Shell Commands


You can use familiar shell commands to navigate easily:


api.twitter.com:/1/statuses > cd ..
api.twitter.com:/1/ > cd /
api.twitter.com:/ >


Piping Output for Formatting


If you want to format your data, just pipe the output to external commands:


api.twitter.com:/1/statuses > get public_timeline.xml | xmllint -format -
...
< statuses type="array" >
< status >
< created_at >Wed Dec 14 00:57:12 +0000 2011
...


Posting Data Made Simple


You can also post data to your server effortlessly:


$ httpsh http://localhost:28017
localhost:28017:/ > post /foo/bar
... { "a" : 123456 }
... HTTP/1.0 201
> content-type: text/plain;charset=utf-8
> connection: close
> x-ns: foo._defaultCollection
> content-length: 15
> x-action: bar

The response will be something simple like:


{ "ok" : true }


Using JSON with Web Forms


You can even use JSON to post to web forms with special notation! Here’s how:


somewebsite:/ > post /some/form/handler
... @{ ... "name": "Chris", ... "occupation": "Developer" ... }

This converts into name=Chris&occupation=Developer so it fits right in!



Setting Headers Easily


If you need to set headers, it's super simple too:


localhost:28017:/ > .headers Cookie:session=5cb9586618eea2374377bb1584

localhost:28017:/ > .headers User-Agent:AppleWebKit/535.13

localhost:28017:/ > .headers
< Cookie: session=5cb9586618eea2374377bb1584


Installation


To install HttpShell:


python setup.py install


Or if pip is installed:


pip install httpshell


May require sudo to install!


How Download Works

Go to the Softpas website, press the 'Downloads' button, and pick the app you want to download and install—easy and fast!

SoftPas Safety Info
SoftPas

SoftPas is your platform for the latest software and technology news, reviews, and guides. Stay up to date with cutting-edge trends in tech and software development.

Recent

Help

Subscribe to newsletter


© Copyright 2024, SoftPas, All Rights Reserved.