在下面的函数中,在ValidateRecaptcha完成后,reCaptchaResponse
为True,但是当我到达我的控制器时,它是一个空对象,所以我想发回reCaptchaResponse和$ http。发布...,但我不知道该怎么做。如果有错误,那很好,因为我只是返回错误。
var insertCarbFormSubmission = function (carbForm) {
return validateRecaptcha().then(
function (reCaptchaResponse) {
if (reCaptchaResponse === "True") {
return $http.post("http://localhost:59437/api/CarbFormSubmission/Post", carbForm);
}
return reCaptchaResponse;
}
);
};