Created
May 7, 2019 13:07
-
-
Save JamesHusband/61ec6d7b39012301e9d5dabc2ffa7d54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lambda needs a https endpoint
Remove content type so the request type is "post" not "options"