【发布时间】:2017-10-22 08:16:09
【问题描述】:
当我尝试检查正确性时,Google RECAPTCHA 总是在响应中返回错误缺失输入响应。对服务的调用如何转到 URL https://www.google.com/recaptcha/api/siteverify?
【问题讨论】:
标签: recaptcha
当我尝试检查正确性时,Google RECAPTCHA 总是在响应中返回错误缺失输入响应。对服务的调用如何转到 URL https://www.google.com/recaptcha/api/siteverify?
【问题讨论】:
标签: recaptcha
确保Content-Type 设置为application/x-www-form-urlencoded
.Net 示例
using (HttpClient httpClient = new HttpClient())
{
var response = await httpClient.PostAsync(GoogleVerificationUrl + "?secret=" + ReCaptchaSecretKey + "&response=" + ReCaptchaResponse, new StringContent("", Encoding.UTF8, "application/x-www-form-urlencoded"));
}
【讨论】:
格式为: https://…/api/siteverify?secret=[…]&response=[…]&remote_ip=[…]
【讨论】: