I have implemented an Ajax request on my website, and I am calling the endpoint from a webpage. It always returns 200 OK, but jQuery execut
Use the following code to ensure the response is in JSON format (PHP version)...
header('Content-Type: application/json'); echo json_encode($return_vars); exit;