Closed EricClaeys closed 1 year ago
If a web server doesn't return "Content-Type: application/json", the $.ajax() call treats the string as text, not json data, and fails. Explicitly define the dataType as "json".
Also, add an error() function.
If a web server doesn't return "Content-Type: application/json", the $.ajax() call treats the string as text, not json data, and fails. Explicitly define the dataType as "json".
Also, add an error() function.