Answer the question
In order to leave comments, you need to log in
Swagger using api, requests give: "...No 'Access-Control-Allow-Origin'...Origin 'null' is therefore not allowed access" what to do?
The employer gave a test task: write the client part for Api and gave a link to swagger.
the point is:
I am writing a request to the address
$http({method:'POST', url:'http://frontendtest.xrm.ru/api/Sessions'})
.success(function(result){
return result;
})
.error(function(err){
console.log('session not get',err);
})
XMLHttpRequest cannot load http://frontendtest.xrm.ru/api/Sessions. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Answer the question
In order to leave comments, you need to log in
Simpler ways:
On the server ( frontendtest.xrm.ru which) implement CORS
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question