Skip to content

Instantly share code, notes, and snippets.

@dgundi
Last active December 27, 2015 13:09
Show Gist options
  • Save dgundi/7331525 to your computer and use it in GitHub Desktop.
Save dgundi/7331525 to your computer and use it in GitHub Desktop.
var request = $.ajax({
url: "/api/v2/admin/sites/current/webapps/Some_sample_app/items",
type: "POST",
headers: {
"Authorization": access_token
},
contentType: "application/json",
data: '{ "name": "MyWebAppItem" }'
}); // 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);
});
@Favorwilliams
Copy link

My Pleasure to write you,
My name is Favor Williams,
My email address is
( Favor24@live.com)
Am interested to know
more about you,
Contact me for my
photo and other
important issue via,

Favor24@live.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment