i get the request error 404
Please share the API response too
i am also facing the same import axios from “axios”; const BASE_URL = "https://youtube-v31.p.rapidapi.com/search" const options = { method: ‘GET’,
params: { maxResults: '50' }, headers: { 'X-RapidAPI-Key': process.env.REACT_APP_RAPID_API_KEY, 'X-RapidAPI-Host': 'youtube-v31.p.rapidapi.com' }
} export const fetchFromAPI = async(url)=>{ const {data}= await axios.get(${BASE_URL}/${url},options); return data }
${BASE_URL}/${url}
Kindly share complete details like API request, parameter, response.
הצטרף לדיון - הוסף תגובה למטה:
Please share the API response too
i am also facing the same
import axios from “axios”;
const BASE_URL = "https://youtube-v31.p.rapidapi.com/search"
const options = {
method: ‘GET’,
}
export const fetchFromAPI = async(url)=>{
const {data}= await axios.get(
${BASE_URL}/${url}
,options);return data
}
Kindly share complete details like API request, parameter, response.