Created
November 16, 2019 15:07
-
-
Save raihanba13/99110cb36160e7a0fd85f774cd934e13 to your computer and use it in GitHub Desktop.
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 = JSON.stringify({ | |
"method": "Authenticate", | |
"params": { | |
"database": "database", | |
"userName": "[email protected]", | |
"password": "password" | |
} | |
}); | |
var xhr = new XMLHttpRequest(); | |
xhr.addEventListener("readystatechange", function () { | |
if (this.readyState === 4) { | |
console.log(this.responseText); | |
} | |
}); | |
xhr.open("POST", "https://my.geotab.com/apiv1"); | |
xhr.setRequestHeader("content-type", "application/json"); | |
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