Skip to content

Conversation

@jehhynes
Copy link

@jehhynes jehhynes commented Jan 21, 2022

If the content-type of a form is JSON, then I am getting the following error:

System.InvalidOperationException: Incorrect Content-Type: application/json; charset=UTF-8 at Microsoft.AspNetCore.Http.Features.FormFeature.ReadForm() at Microsoft.AspNetCore.Http.DefaultHttpRequest.get_Form() at Recaptcha.Web.RecaptchaVerificationHelper..ctor(HttpContext httpContext, String secretKey) at Recaptcha.Web.Mvc.RecaptchaMvcExtensions.GetRecaptchaVerificationHelper(Controller controller) at

In this case, the recaptcha response is included as part of the JSON object, and so it can be passed into the RecaptchaVerificationHelper constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant