0

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?

Obay
  • 3,135
  • 15
  • 55
  • 78

0 Answers0