cURL vs HTTPie: Interacting with HTTP servers

- 1 min

curl-vs-httpie

For testing and debugging while developing RESTful APIs or HTTP servers or even playing around with APIs, cURL used to be my default tool of choice. However, my life literally changed once I found out about HTTPie. HTTPie is a command line HTTP client written in python that allows for sending arbitrary HTTP requests using a simple and natural syntax, and displays colorized output.

Let’s make some GET and POST requests using curl and httpie and see the difference in request syntax as well as responses.

GET Request

POST Request

Installation

Installing HTTPie is pretty simple using pip.

pip install httpie

I really like HTTPie due to its expressive and intuitive syntax, formatted and colorized terminal output and built-in JSON support. I recommend you try it as well.

Prashant Anand

Prashant Anand

Machine Learning Engineer

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora googlescholar