Chapter 10. HTTP Tools
This book began with an introduction to HTTP that included simple tools such as cURL and HTTPie (see âCommand-Line HTTPâ for examples). These are key tools that youâll see used again and again throughout the book, but there are also a host of other tools which are very handy in particular scenarios; this chapter is dedicated to showing you the other tools in the box.
These are all tools that you can use without changing your application (although weâll talk about that too, in Chapter 11) so you can quickly inspect traffic in a variety of settings and review whatâs happening.
Weâll start with cURL and HTTPie, and add in two tools that I use extensively when working with JSON services in particular: jq and the Python JSON module. There are also some excellent GUI alternatives to these command-line tools that may fit your needs better. Weâll look at Postman, which is a great graphical tool for working with web requests.
On a more network level, thereâs Wireshark, an excellent tool for inspecting traffic as it goes over your network card. Thereâs ngrok, which allows you to make your local API or website visible externally; I use this regularly when working with local development APIs and with webhooks. Weâll also look at the proxy tools Charles and Fiddler.
Each of these tools will help you to solve different problems, so itâs well worth taking a look at each of them. That way, youâll know whatâs available and where to start when you ...
Get PHP Web Services, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.