Ajax Request not triggering success, Response 200
I am trying to request data by ajax from ripe.net, but the ajax request never triggers the success function, even through I get an http Response 200. My current code looks like this:
$.ajax({
headers: {
Accept : "application/json; charset=utf-8",
},
type: 'GET',
url: 'http://rest.db.ripe.net/search',
data: {
'source' : 'ripe',
'query-string': '172.217.16.67',
'type-filter': 'inetnum'
},
success: function(res) {
console.log(res);
}
});
(I changed the IP to google.com)
Currently I've tried the following things:
None of the above worked for me. Do you have an idea why the success function isn't called, or what i am doing wrong?
Edit: The Requestheaders are:
Host: rest.db.ripe.net
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Accept: application/json; charset=utf-8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: ...
Origin: ...
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
The Responseheaders are:
Date: Thu, 21 Dec 2017 11:15:54 GMT
Server: Jetty(9.3.z-SNAPSHOT)
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0
Content-Encoding: gzip
Keep-Alive: timeout=15, max=100
Content-Length: 1148
Accept-Ranges: none
Connection: keep-alive
链接地址: http://www.djcxy.com/p/39200.html
上一篇: jQuery ajax成功选项中返回的参数是什么?
下一篇: Ajax请求不触发成功,响应200