Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fetch('http://localhost/PHP/api/cities.php?search_query=' + cityInput.value)
- .then(response => response.json())
- .then(json => { if(json.ok) { createSearchResult(json.data.cities, json.data.restResults) }; isRequestPending = false; })
- .catch(e => openModal(e.message));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement