Using AJAX post request when endorsing