skip to Main Content

Reactjs – YouTube Autocomplete Search Api not Working

I am trying to fetch search results by using youtube autocomplete API but I am getting an error: const YOUTUBE_SEARCH_API = http://suggestqueries.google.com/complete/search?client=firefox&ds=yt&q= const getSearchSuggetsions = async (text) => { const data = await fetch(YOUTUBE_SEARCH_API + text); const json = await…

VIEW QUESTION

Javascript – fetch post redirecting to api response body

I have the following code: const form = document.querySelector('form'); form.addEventListener('submit', handleSubmit()); async function handleSubmit(event) { const url = new URL(form.action); const formData = new FormData(form); @type {Parameters<fetch>[1]} const fetchOptions = { method: form.method, body: formData, }; const response = await…

VIEW QUESTION
Back To Top
Search