How to solve the problem with crossdomain request?

Make the connection request to the API

$(document).ready(function () {
//$("#sendData").click(function(){
$.ajax({
 type: 'POST',
 contentType: 'application/json',
 url: 'https://e-solution.pickpoint.ru/apitest/login',
 //data: { 'Login':'apitest','Password':'apitest'},
 dataType: 'json',
 success: function() {
//console.log(result)
//$('div.my-div').append(result);
 // $( "#success-message" ).removeClass( "hidden-block" );
}
});
 //}); 
 });


In response to receiving

XMLHttpRequest cannot load https://e-solution.pickpoint.ru/apitest/login. Response to a preflight request doesn't pass the access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://fiddle.jshell.net' is therefore not allowed access. The response had HTTP status code 404.

I understand the problem with crossdomain requests. How to change the code to avoid errors?
July 8th 19 at 15:24
1 answer
July 8th 19 at 15:26
$(document).ready(function () {
$("#sendData").click(function(){
$.ajax({
type: 'POST',
contentType: 'application/json',
url: 'https://e-solution.pickpoint.ru/apitest/login',
data: { 'Login':'apitest','Password':'apitest'},
jsonp: "callback",
dataType: "jsonp",
success: function() { alert("Success"); },
error: function() { alert('Failed!'); },
});
});
});

so? - william.Bog commented on July 8th 19 at 15:29

Find more questions by tags JavaScriptjQuery