7 Helpful HTTP Tools

 

An API provider is akin to a handyman. To fix a specific problem, a specific solution is needed, and a skilled handyman is the only one with the experience, the know-how, and the ability to fix these issues. The same is true in the API space. To continue the allegory, just like a handyman has a helpful toolbox of tools to alleviate common gripes and concerns, so too should an API provider have a toolbox full of their own speciality tools.

Today, we’re going to look at some of these tools, and briefly summarize what they do. We’ll look at a variety of implementations, both command-line and GUI-centric HTTP clients, and talk generally about what they do, and how an API provider might find value in them. To be clear, we’re not recommending a specific tool here, as finding the right tool will be highly variable for each provider.

cURL

cURL, also written as “curl”, is often branded as a one-stop shop for HTTP requests. The idea behind cURL is to provide a powerful method for transferring data either to or from a server using a wide range of protocols.

In fact, it’s this wide range of protocols that makes cURL such a beloved solution. According to official documentation, cURL supports:

What this means is that if you need data transferred to or from a server, there’s a very good chance that cURL can get it done. All of this functionality is gained through a dependence on the libcurl library, and because of the wide protocol support it offers, this library and cURL has seen use in printers, media centers, and even cars. What this all comes to offer the average developer is a very powerful library and tool that offers almost immediate compatibility with a wide range of devices.

cURL: most popular, with huge language support

http-console

http-console is another console-based system for interacting with HTTP. While cURL is very powerful, it can be hard to navigate. Similarly, while HTTPie is powerful, it has its own syntax and way of going about things that can be confusing to some developers.

http-console, then, is somewhat of a middle ground. It’s designed to be simple and support cross-platform HTTP protocol interactions, so much so that the official documentation summarizes its purpose in a single phrase – “talking to an HTTP server with curl can be fun, but most of the time it’s a PITA (pain in the ass)”.

While http-console is very easy to use, especially due to the fact that it uses pretty typical syntax, it’s not as powerful as other solutions like cURL. That being said, it’s very easy to set up, doesn’t have many dependencies, and is truly cross-platform – for this reason, it may be best for new developers, those looking for efficiency, or those who don’t need full-feature suites.

http-console: simple, easy to set up, cross platform

HTTPie

In the same vein as cURL, HTTPie is an HTTP client designed to make the entire process easier, more human-friendly, and more intuitive. While cURL is easy to utilize once one has some experience and has poured through the documentation, the wide range of options on offer can be somewhat daunting.

HTTPie takes a slightly different approach – while it’s still very powerful, much of its focus is placed on making this power easier to utilize. Using a very simple command and a relatively intuitive syntax, HTTPie offers ease of use with a still very respectable range of functions, including JSON support, support for forms and file uploads, persistent sessions, wide ranging OS support, custom headers, and more.

It should be noted here that, while many consider HTTPie to be a replacement for cURL, or an upgrade for other similar, older tools, it’s really a matter of approach. While HTTPie is very powerful, the near ubiquity in many devices of cURL makes HTTPie a hard sell for those who utilize the former.

That being said, starting from scratch, HTTPie might be the better choice for novice users, and the simplicity and intuitiveness of this toolset can’t be overstated in value.

Http-pie: A human friendly HTTP client

http-prompt

Based heavily upon HTTPie and the python prompt toolkit, http-prompt is an amalgamation of the best features of either toolset.

Perhaps the strong selling point of its features is the fact that http-prompt boasts a very powerful autocomplete feature that allows for the entry of shorthand commands and the autocorrelation with known entries. This can be hugely time saving for busy developers, especially when testing known functions, issues, or other recurrent items.

Additionally, http-prompt has a very seamless and easy to utilize system of syntax highlighting, which can lend itself very well to troubleshooting and testing. While other entries on this list have some form of syntax highlighting, this feature in combination with the autocomplete feature multiples the effectiveness of API developer actions, allowing for a greater understanding of the system design and a more agile way of responding to this design.

It should also be noted that http-prompt boasts a lot of functionality that seems oddly Unix-like. This familiarity is actually intended, and has some really great benefits for those who know how to leverage them. By tying into Unix-like piping and redirections, you can feed outputs into inputs, combining queries and operations into seamless commands. Additionally, the integration of the OpenAPI specification format allows for the listing of endpoints using “ls”, displaying these endpoints as if they were a filesystem.

http-prompt: unique for its autocomplete, syntax highlighting, and OpenAPI support

jq

On the theme of Unix-like function, jq serves as a very powerful command-line tool for JSON that is used primarily for transformation and filtering of JSON streams. For Unix and Linux-derivative users, this function is principally related to, and almost functionally identically to, the “sed” command.This similarity is evident in the jq documentation

“jq is like sed for JSON data – you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text.”

While conceptually simple, jq (and sed for that matter) is a very powerful tool, allowing for massive mutation of a data stream, even wholesale conversions from one data format to another, with very little loss of processing to additional tasks, libraries, dependencies, co-functions, etc.

jq is written in portable C, and by design has zero runtime dependencies. This means that jq is extremely powerful in its ability to manipulate data, but that this power is not beholden to a large amount of libraries, dependencies, or other such tie-ins. jq can be downloaded as a binary and implemented in a very short timeframe with very little processing cost.

jq: free from dependency at runtime

Postman

Postman is, at it’s most basic, a GUI for HTTP request generation and inspection. That being said, Postman certainly does more than simply allow for this process – in fact, Postman is a very effective and efficient tool for API development, offering a wide range of features that can result in better APIs.

Perhaps the strongest feature in Postman is its sleek interface. While many API developers whose experience rests largely in coding might find this somewhat purposeless, for many novice developers, this is absolutely a great addition to the toolset. Additionally, by moving out of the command line and into the GUI space, with additional tools integrated, a broader picture can sometimes come into better focus than if you were stuck on a prompt.

All of the other features that Postman has to offer are centered around this idea of making for an easier, more seamless, and less convoluted development process. Saving of API request histories, automated testing systems, API monitoring and metrics collection functions, and even mock servers all come together to make Postman a very powerful tool for both novice and storied developers.

Postman: the sleek GUI alternative

Paw

Paw is definitely a more complicated tool than we’ve discussed thus far. The added complexity isn’t without benefit, however – the addition of a really great and extensive interface makes Paw one of the easiest interfaces on this list to use. This ease of use and the relatively polished nature of the interface itself leads to a very intuitive series of interactions, and thus is a great first tool for novice developers and seasoned developers alike.

Paw boasts quite a lot of features for what is ultimately a single tool, which is very alluring for those seeking efficiency and a relative balance between simplicity and functionality. Paw supports JSON and RAML, and also ties into the Swagger specification, which definitely makes it a strong solution for describing your API.

A big selling point in the Paw documentation is that paw lends itself to collaborative editing. By unifying features like endpoint lists, environment variables, and integrations that promote team editing and revisions, teams can develop more seamlessly, testing each step of the way.

Paw: Robust feature set with collaborative editing

Insomnia

Insomnia is a great solution along the lines of Paw or Postman, and features some unique code-centric solutions. While it has support for global variables like Paw, and exportation of call information like Postman, it also integrates code generation for over thirty language libraries, allowing for quick API coding and responsive design. This is likely the greatest selling point for Insomnia, and in fact the documentation for Insomnia cites this conceptual feature as “write less code”.

The entire idea behind Insomnia is an idea that’s been touted by novice developers over and over in recent years – function more like a human, and less like a machine. The centric focus of human-readability for debugging tools has led to greater prevalence of UIs like those discussed throughout this piece, and one could argue that Insomnia is the natural result of such a focus.

Additionally, Insomnia is very heavily invested in its community support and development efforts. In fact, in June 2017, Insomnia integrated Unix Domain Socket Support, a methodology for communication between processes on a single host machine. This was a community-developed feature, and seeing such a well-designed application integrate such functions through community efforts will only lead to greater and more robust functionality.

Conclusion

While any of these tools are acceptable for most providers, it should be noted that this is only the tip of the iceberg. That’s the great thing about something as open and public as HTTP – almost anyone can take it upon themselves to design a specific solution to a specific problem, and for API providers, this invariably means a wide breadth of options to solve even the most specific of issues.

That being said, we’d like to know – what are your favorite implementations? Do you prefer apps like Insomnia, or integrated solutions like Postman? Let us know in the comments below.

About Kristopher Sandoval

Kristopher Sandoval is a web developer, author, and artist based out of Northern California with over six years of experience in Information Technology and Network Administration. He writes for Nordic APIs and blogs on his site, A New Sincerity.

  • Mike T

    Very good and researched article. In regards to Postman (my favorite), you can export your calls by selecting the code button in many formats. Once you create a Collection it can be exported and run with Newman for monitoring the API’s around the clock. You can add test cases too. QA and Operations will love you.
    Also there is SoapUI.

    Thank you for the information.

  • Jerry W

    Very good tools on this list, but I miss some other helpful http tools, for example, Fiddler (http://www.telerik.com/fiddler) which is an extremely popular http debugger. SoapUI (https://www.soapui.org/) and HttpMaster (https://www.httpmaster.net/) also offer some interesting features for http testing.
    As you can see, I really prefer standalone tools, not some plugins tied to a specific browser and its http engine. Maybe for some quick and dirty requests browser plugin should be enough, otherwise …

  • Might I suggest to add Restlet Client to this list (I’m the founder of Restlet)? It is the #1 visual client available as a Chrome Extension, supporting also automated API testing (visual and command line): https://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm

  • gschier

    Thanks for the mention of Insomnia! (I’m its creator)

  • andro hgaray

    I suggest DHC to