Skip to content

Instantly share code, notes, and snippets.

@leovarmak
Created May 10, 2018 08:20
Show Gist options
  • Save leovarmak/37612389ec4ad69df1e7a569dc07d728 to your computer and use it in GitHub Desktop.
Save leovarmak/37612389ec4ad69df1e7a569dc07d728 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Hi</title>
<script type="text/javascript">
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.coindcx.com/exchange/ticker");
xhr.setRequestHeader("Cache-Control", "no-cache");
xhr.setRequestHeader("Postman-Token", "1d29af5c-c1e3-4028-b00c-d8a7b315bcd5");
xhr.send(data);
</script>
</head>
<body>
Hi
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment