jQuery AJAX

jQuery AJAX is an excellent method for displaying the response object of a JSON API within an HTML page without reloading or using an iFrame.


I will first show you sample jQuery Ajax syntax followed by the html for the div container which will display the output.

As you can see, it is possible to query a RESTful JSON API and output the contents directly on a web page (all client-side, in browser). The example above even passes a token through the header to authenticate access to a restricted page.