We are having issues implementing Google's reCAPTCHA within one of our webspeed pages. Does anyone have example code for the calls to Google's API?
Out of curiosity are you also setting the 'Content-Type:' to 'application/x-www-form-urlencoded'? and the 'Accept:' to 'application/json' in the HTTP headers?I am using Openedge10.1c
Your assumption is correct. We have an existing webspeed page that is currently using the first version of Google's Captcha. This version will become obsolete at the end of March, and we have been working on wiring up reCAPTCHA 2, with no success. Our calls to reCAPTCHA are returning the following error:
Error 411 (Length Required) POST requests require a <code>Content-length</code> header.
I am supplying a content-length header, so I'm not sure what to try next.
I don’t think it the version of OpenEdge is the issues, but it is worth upgrading anyway.Thanks Cecil for the ideas... we've tried content types of application/x-www-form-urlencoded, and we've tried content-length of 0 as well as the length of the string being submitted. We tried the accept application/json as well and still only get the Error 411 response.
Do you think it might be related to the version of Openedge that we are on?
THanks.Cecil... you are unbelievable! I wasn't expecting you to take a stab at coding it, but I am grateful that you did. We compared your implementation to ours and they are very similar. We noticed that you were using a different port in your call, and when we made that change we were able to get past our initial error.
At this point, we are running into an SSL issue and are working with your IT team to see if it is a certificate error related to our port change.
I don't see any way on the forum to highlight you as a rockstar, but if there is a way... let me know and I will gladly give you some cred!