httpie – A Pretty Way to cURL for APIs

Thanks to Ben Ramsey for sharing this nifty little tool called httpie. What it does is it makes calling APIs from the CLI easy as pie. With curl you’d see something like this:

[bash]

curl -i -X PUT -H ‘Content-Type:application/json; charset=utf-8’
-d ‘{"hello":"world"}’ http://httpbin.org/put

[/bash]

Where as with httpie, its a simple:

[bash]

http PUT httpbin.org/put hello=world

[/bash]

This is great for working with JSON based APIs. It also will pretty up the output:

httpie output

Website: https://github.com/jkbr/httpie

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close