Well its all in the title. I try to verify the user password before performing destructive actions:
$.ajax({ type: 'POST', url: '/path/to/post.json', data: { password: '**********' }, success: function() { console.log("Success!"); }, error: function() { console.log("Error!"); } });
In the console:
202 Accepted 123ms Error!
I thought that 403 Forbidden for the wrong password and 202 Accepted for the correct password, there will be suitable response codes, but I know little about HTTP to be honest.
jQuery version 1.8.3
Ajcodez
source share