i have an Postman API and its working in postman but i want to run it in javascript and get the return values but there's an error im encountering
No 'Access-Control-Allow-Origin' header is present on the requested resource
i research and it is said it is caused by the CORS, how can i implement/bypass it in javascript?
$( document ).ready(function() {
$.ajax({
method: "POST",
contentType: "application/json",
url: "https://dev.mysample.com/api/v1/Access",
data: { ClientID: "myID", ClientSecret: "password", GrantType: "mycredentials"}
}).done(function( msg ) {
console.log(msg);
}).fail(function( msg ) {
console.log(msg);
});
});
im using asp classic as my server side language