Skip to content

Instantly share code, notes, and snippets.

View logemann's full-sized avatar

Marc Logemann logemann

View GitHub Profile
import Sns from "aws-sdk/clients/sns";
import axios from 'axios';
import * as querystring from 'querystring';
const reCapUrl = "https://www.google.com/recaptcha/api/siteverify";
// we got this from personal reCaptcha Google Page
const reCaptchaSecret = "xxxxxxxxxxxxxxxxxxxxxxxx" ;
function bodyToMap(parts: any) : Map<String, String>{
<html>
<head>
<script src="https://www.google.com/recaptcha/api.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous">
</script>
<script>
function onSubmit(token) {
$("#ContactForm").prop("action", "https://api.mydomain.com/cform");