Skip to content

Instantly share code, notes, and snippets.

@AndrewSepic
Created July 19, 2020 02:03
Show Gist options
  • Save AndrewSepic/5aa96a6a932f4f0d2c8cf0266ae6e6ff to your computer and use it in GitHub Desktop.
Save AndrewSepic/5aa96a6a932f4f0d2c8cf0266ae6e6ff to your computer and use it in GitHub Desktop.
<script>
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://cors-anywhere.herokuapp.com/https://api.mindbodyonline.com/public/v6/client/clients?limit=100&offset=0");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("API-Key", "7bba39594b4d460293abdfd64c8eea48");
xhr.setRequestHeader("SiteId", "-99");
//xhr.setRequestHeader("Authorization", "{{staffAuthToken}}");
xhr.send();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment