I have a jQuery AJAX call, which returns 200
, but response body is empty.
$.ajax({
method: 'GET',
url: api,
data: {
'action': 'check',
'ip': hostname
},
success: function(result) { ... },
dataType: 'json'
});
I copy the actual request URL generated by the AJAX call into the browser, and I get the desired output (JSON).
https://example.com/sub/folder/index.php?action=check&ip=1.2.3.4
What could be wrong with the AJAX call?