Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for JSON or other response type #66

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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