I need some help with fetching data,
it said blocked by CORS policy,
I've tried to install chrome extension that allowed CORS, but it was still error,
I've tried by POSTMAN, the API respond correctly,
I've tried using axios, it was still error,
I've tried change "Access-Control-Allow-Origin": "*"
to "Access-Control-Allow-Origin": "http://localhost:3000"
, it was still error,
i think my problem is in "Access-Control-Allow-Origin": "*"
,
I really appreciate your help.. thank you..
fetch("https://api.rajaongkir.com/starter/province", {
method: "GET",
headers: {
key: myKey,
"Access-Control-Allow-Origin": "*"
}
}).then(res => {
console.log(res);
});