I'm currently sending a post request from a client to the server and once the server sends back its response I check to see if its a success in the client. However, I'm getting an error when checking for success
$.post("/getSearchResults", options, function(response) {
console.log("test");
console.log("response" + response);
if(response.status == "success")
on this last line I'm getting this error: ReferenceError: success is not defined.
How can I know if the post request was a success (does the server need to set some success variable to true?)
via learner561