Spotify

[JavaScript] Sending AJAX Request to Django Backend for Spotify Music Search

Koowoy
Task Create a search input and add an event listener to it in JavaScript. Whenever the search query changes, send a request to the view in the backend via url. Code // Function to Get Token function getCookie(name) { let cookieValue = null; if (document.cookie && document.cookie !== "") { const cookies = document.cookie.split(";"); for (let i = 0; i < cookies.length; i++) { const cookie = cookies[i].trim(); // Does this cookie string begin with the name we want?