How to make a $post request from localhost?

Running localhost, when js:
$.post( "http://www.myweb.ru/api/rest/product?id=1", function() {
console.log('a');
})


Error
localhost/:1 XMLHttpRequest cannot load http://www.myweb.ru/api/rest/product?id=1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9000' is therefore not allowed access.


The Internet sends me to look for crossdomain request (for example https://learn.javascript.ru/xhr-crossdomain), but something nothing helps me.
Explain what the problem is and how to solve it.
July 9th 19 at 13:48
2 answers
July 9th 19 at 13:50
Solution
you can run chrome in the TV is disabled as CORS here

and you can install a chrome plugin that does it
stackoverflow.com/questions/35432749/disable-web-s... Explained to me the above solution. Thank you. - Camryn.Yun commented on July 9th 19 at 13:53
July 9th 19 at 13:52
in the beginning of the code page which is the query you want to insert
header('Access-Control-Allow-Origin : *');
The people who made the api says that all spelled out - Camryn.Yun commented on July 9th 19 at 13:55
: kagbe error says that the People who made the api, tryndit. - Camryn.Yun commented on July 9th 19 at 13:58
: send a request via simple online form open resib developer in the browser and look at the response headers there needs to be Access-Control-Allow-Origin, if no, then "your friends ten little Indians. All the PI..." - kavon.Murphy commented on July 9th 19 at 14:01
: if there is no such header, then the browser will not process the response my.jetscreenshot.com/demo/20160517-osbo-148kb.jpg - saul.Stiedemann commented on July 9th 19 at 14:04
And yet the title has - saul.Stiedemann commented on July 9th 19 at 14:07

Find more questions by tags jQuery