0
Hello, I’m having problems performing a PUT in AJAX with the weather api, my code is this :
var URL = 'http://apiadvisor.climatempo.com.br/api-manager/user-token/TOKEN/locales';
$.ajax({
url: URL,
type: 'PUT',
contentType: 'application/json',
data: {'localeId': '3477'},
dataType: 'json',
success: function (result) {
console.log("sucess?");
}
});
}
the error that returns me is this:
Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
You have replaced the TOKEN value in your URL?
– Woss
yeah, substitute, just didn’t put it here!
– Gabriel Nunes
Checks on your access, in tokens, if CORS is disabled for your project.
– tvdias