January 2019
Intermediate to advanced
490 pages
15h 37m
English
Follow these steps to use CodePen to connect to our API through GET:
Enter the following code in the JS section of the CodePen UI and click Run:
var xhr = new XMLHttpRequest();xhr.open('GET', 'https://8vqyyjelad.execute-api.us-east-1.amazonaws.com/dev/greeting/Heartin');xhr.onreadystatechange = function (event) {console.log(event.target.response);}xhr.setRequestHeader('Content-Type', 'application/json');xhr.send();
We should receive a blank response ...
Read now
Unlock full access