I am trying to get pricedata with the API from Fuzzwork Market Data.
I have setup this simple ajax request in javascript but I keep getting this error:
Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8000’ is therefore not allowed access.
But I did set the header as you can see below.
Am I missing something?
please halp
function getMarketPrices() {
let marketUrl = 'https://market.fuzzwork.co.uk/aggregates/?station=60003760&types=34,35,36,37,38,39,40';
$.ajax({
url: marketUrl,
headers: {
'Access-Control-Allow-Origin': 'http://localhost:8000'
},
success: function (response) {
console.log(response);
},
error: function (response) {
console.log(response)
}
});