concept Chrome in category api

This is an excerpt from Manning's book Irresistible APIs: Designing web APIs that developers will love.
In chapter 2, you were introduced to some ways to inspect HTTP traffic. Understanding how your developers will interact with your system is a critical component of API success, so you need to test your system as if you were one of the developers trying to use it. Inspecting API traffic is also helpful when creating support documentation or helping developers. Watching traffic using a sniffer is quite useful when trying to debug complex API calls, but for the purposes of understanding how HTTP traffic works in general, using a browser is a fine choice. For this discussion, you’ll put together the information in section 3.1 with web calls. I suggest using Chrome or a similar browser with HTTP traffic inspection. To start, I discuss how to get Chrome set up correctly to give you the information you need, and then we’ll explore how it applies more completely to the example application discussed in chapter 2.
To set up Chrome for HTTP inspection, you first need to enable the Developer Tools. If you don’t have one already, get a copy of Chrome to use on your system. One major advantage to Chrome in this case is that it’s available for all major operating systems and works consistently across each of them. To download Chrome, go to www.google.com/chrome/ and get the appropriate version for your system.
After you’ve got Chrome up and running, the first thing to do is go to my website: www.irresistibleapis.com/demo. Figure 4.6 shows what it looks like in Chrome.
Figure 4.7. Once you’ve started the website in Chrome, you can activate the C Developer Tools using the path View > Developer > Developer Tools.
![]()
Once you’ve opened the Developer Tools, you need to tell Chrome that you want to be able to see network traffic (this parameter adds overhead to the requests, so it’s disabled by default). To do that, click the Network button in the Developer Tools at the bottom of the page. Figure 4.8 shows what this will look like in your browser.
Figure 4.8. Now that you’ve opened the Developer Tools, switch to the Network tab to get to the information you want to see.
![]()
Once on the Network tab, you need to check Preserve Log. Normally, Chrome throws away old network traffic as it goes in order to keep the memory footprint low, but in this case, that’s the information you want. Figure 4.9 shows where this checkbox is.