Created
August 21, 2019 15:49
-
-
Save nickgs/789280af04d42f5c306aaf9151318cd0 to your computer and use it in GitHub Desktop.
ADC Product API Javascript Example
This file contains hidden or 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
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://www.adctoday.com/api/v1/product/700-11ABK"); | |
xhr.setRequestHeader("Accept", "*/*"); | |
xhr.setRequestHeader("Cache-Control", "no-cache"); | |
xhr.setRequestHeader("Host", "www.adctoday.com"); | |
xhr.setRequestHeader("Accept-Encoding", "gzip, deflate"); | |
xhr.setRequestHeader("Connection", "keep-alive"); | |
xhr.setRequestHeader("cache-control", "no-cache"); | |
xhr.send(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment