AJAX request gets “No 'Access-Control-Allow-Origin' header is present on the requested resource” error

后端 未结 3 1436
你的背包
你的背包 2020-12-06 11:01

I attempt to send a GET request in a jQuery AJAX request.

$.ajax({
    type: \'GET\',
    url: /*  */,
    dataType: \         


        
3条回答
  •  失恋的感觉
    2020-12-06 11:32

    you can ask the developers of that domain if they would set the appropriate header for you, this restriction is only for javascript, basically you can request the ressource from your server with php or whatever and the javascript requests the data from your domain then

提交回复
热议问题