Skip to content

Instantly share code, notes, and snippets.

@simonuvarov
Last active February 15, 2023 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonuvarov/d9890a87e73860e30e6c64819d503334 to your computer and use it in GitHub Desktop.
Save simonuvarov/d9890a87e73860e30e6c64819d503334 to your computer and use it in GitHub Desktop.
<html>
<head></head>
<body>
<textarea class='token' style="width: 800px; height: 250px;"></textarea>
<script>
var req = new XMLHttpRequest();
req.onload = reqListener;
req.open('POST','{url}',true);
req.withCredentials = true;
req.setRequestHeader('Content-Type', "application/x-www-form-urlencoded")
req.send("{data}");
function reqListener() {
document.getElementsByClassName('token')[0].value = this.responseText;
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment