I am try to use Oauth token to access Jira REST API by using jquery, Token URL works with REST client tool.
$.ajax({
url:URL,
headers: {
"Content-Type":"application/json",
"X-Atlassian-Token":token
"Accept": "application/json",
"Cache-Control": "no-cache"
},
type: 'GET', // The HTTP Method
datatype: 'jsonp',
async: false,
success: function(data){
alert('Sucess data: ' + data);
},
error: function(data){
alert('alert error');
},
complete: function(xhr) {
if (xhr.status === 200) {
console.log("done!"+ xhr.getAllResponseHeaders());
}
else {
console.log('Request failed. Returned status of ' + xhr.status);
}
},
error: function( req, status, err ) {
console.log( 'something went wrong', status, err );
}
});
Hello Qi Jiang,
Any errors from the server side, could you please provide more details?
Tom
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.