Last active
December 27, 2015 13:09
-
-
Save dgundi/7331525 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 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); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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