I am trying to fetch data from SERP API to fetch Job_Results, on postman, I am able to fetch my data but when I try to fetch it using Axios, I get CORS Error even after specifying Proxy in package.json and passing appropriate headers.
This is my code snippet:
let config = {
headers: {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": "*"
},
};
const data = await axios.get(
"https://serpapi.com/search.json?engine=google_jobs&q=internship+new+delhi&hl=en&api_key=xxxxxx",
config
);