REST

Next lesson in Ajax

We know what is Ajax and how to call it. We know how to read local file using Ajax & We know how to call API to get JSON as response. Now next step further!

We know how to get text from local file using AJAX and using XMLHttpRequest object and how to display in page (of course without page loading).

We know how to call APIs using fetch method and how to get JSON data as response and how to decode that data.

Now we are going to learn the real game! That is How to call your database using AJAX and how to filter/display data on webpage without page loading. For example the live search on table using Ajax (that is what we do with DataTables)

Now in your code, maybe you required to display table of large data and you want to create a search-box where user can see live data with search keywords (exactly same as we see in DataTable example above). In that case you have to send an Ajax request to your database with some parameters. Based on that parameters, your server will run a query to filter the data from tables and respond back to you with particular format (which you requested, mostly in JSON). That is what we are going to learn next!