Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JamesHusband/61ec6d7b39012301e9d5dabc2ffa7d54 to your computer and use it in GitHub Desktop.
Save JamesHusband/61ec6d7b39012301e9d5dabc2ffa7d54 to your computer and use it in GitHub Desktop.
$.ajax({
type: 'POST',
url: '//nnjk58r1d1.execute-api.eu-west-2.amazonaws.com/Prod/lead',
data: data,
contentType: 'application/json',
complete: function() {
console.log( 'lead Recorded' );
if ( 'lp' === leadType ) {
leadRedirect( data.email, getRedirectUrl() );
}
},
timeout: 3000
});
@richardprice-1990
Copy link

Lambda needs a https endpoint
Remove content type so the request type is "post" not "options"

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