Parse Javascript API: Logging your API Requests

Posted on .

If you're developing a web application with Parse, it's extremely important to make sure you have "Log XMLHttpRequests" active in your dev console. You can see the requests in the Network tab without having to do anything, but I'm usually in the Console tab when developing, and I'll catch any problems more quickly if these requests are showing up alongside my other logs.

Screenshot of the Chrome Dev Tools Right-click options

To activate, right click anywhere inside the Console and select "LogXMLHttpRequests" to toggle the logging. Now, whenever Parse hits their servers, you'll know.

Screenshot of an AJAX request log in the Chrome Dev Tools console

Sure, you get 1,000,000 free API requests per month with Parse (very generous)... but if you accidentally code up an infinite loop that results in your app hitting their servers a few hundred times per second, you want to know as soon as possible. (Yes, I've done this. I couldn't click the browser's close button quickly enough.)