Created
July 31, 2016 22:18
-
-
Save andrewmd5/962b4852e7bb5e2a343c161965dd07bb to your computer and use it in GitHub Desktop.
This file contains 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 xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (xhttp.readyState == 4 && xhttp.status == 200) { | |
document.getElementById("demo").innerHTML = xhttp.responseText; | |
} | |
}; | |
xhttp.open("POST", "http://app.strangergif.com:8084/gifs", true); | |
xhttp.setRequestHeader("Content-type", "application/json"); | |
xhttp.send('{"phrase":"Hello World"}'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment