An example AJAX request to check if a username is available in a database. Using a simple AJAX request, we can send a GET request to the server, return JSON and display a message.