Skip to main content

Is there any way I can actually see the JSON that gets sent for my POST or GET requests?

Thanks!

Yes, from Chrome, go to the Console, then go to the “Network” tab, and limit to “XHR”. Then take whatever action causes your REST API request to be made. (If the request happens on page load, you will need to reload your page with the Console still open to see the requests that occur on page load).


The requests will look like this:




Click on “apexremote”. This will bring up a panel where you need to scroll down to the very bottom and then click on “data”:




Then copy the string value of the first item in the data array (If multiple Models are being saved / queried in close proximity, there may be multiple entries in this data array), and paste it into a text editor or JSON pretty printer (e.g. http://jsonprettyprint.com/ ), _ remembering to remove the leading and trailing spaces _so that you get a nicer JSON representation of the request, e.g.



awesome. Thanks, Zach!


Thanks for the great question & answer! This is now documented for posterity (well, documented in another place as well: Updated docs link: https://docs.skuid.com/latest/en/data/troubleshoot/).


Nice work, Anna.

Just a quick note, you may want to update step 3 to include the fact that we need to be on the Headers tab when you click apexremote. I believe chrome defaults to your last tab, and I was on the Results tab at first, which caused a moment of confusion.

So, Step 3 should be:

  1. apexremote

  2. Headers

  3. Request Payload

  4. Data


Thanks! Implemented. Your word is my command.