Skip to content

Instantly share code, notes, and snippets.

@dgundi
Last active December 27, 2015 13:09
Show Gist options
  • Select an option

  • Save dgundi/7331199 to your computer and use it in GitHub Desktop.

Select an option

Save dgundi/7331199 to your computer and use it in GitHub Desktop.
// Perform the AJAX request (make sure you've set the access token
var request =
$.ajax({
url: "/api/v2/admin/sites/current/webapps",
type: "GET",
headers: {
"Authorization": access_token
},
contentType: "application/json"
});
// Request successful, response is in "msg" variable
request.done(function (msg) {
console.log("Request successful");
console.log(msg);
}); // Request failed, you can add your own error handling
request.fail(function (jqXHR) {
console.log("Request failed. Error code: " + jqXHR.status);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment