Skip to content

Support for JSON or other response type - #66

Open
jehhynes wants to merge 2 commits into
tanveery:masterfrom
jehhynes:master
Open

Support for JSON or other response type#66
jehhynes wants to merge 2 commits into
tanveery:masterfrom
jehhynes:master

Conversation

@jehhynes

@jehhynes jehhynes commented Jan 21, 2022

Copy link
Copy Markdown

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