0
私はrally sdkを使用してカスタムhtmlダッシュボードを開発しています。CORS起点リクエスト呼び出しのフィールドデータの1つを入力したいと思います。rally sdk(カスタムhtmlコード)からCORS起点呼び出し要求を作成するには?
あなたはrally sdkカスタムHTMLコードを使用してCORSコールを行う方法のいくつかの例を提供してください。
私はajax呼び出しで試してみましたが、私には403例外があります。
var usChangeSets = story.getCollection('Changesets');
console.log('usChangeSets--',usChangeSets);
usChangeSets.load({
fetch : ['Author', 'Message', 'Uri'],
callback: function(records, operation, success){
Ext.Array.each(records, function(changeset){
//Ajax api call to get details from external link
var blink ="https://[sonarqube]/job/Appdev/job/TestProject/api/json";
Ext.Ajax.request({
url: blink,
method :'GET',
crossDomain: true,
withCredentials: true,
headers : {
'Authorization': 'Basic dsasfsfxfhfj',
'Content-Type': 'application/json;charset=UTF-8',
'Access-Control-Allow-Origin' : '*'
},
success: function(response){
var backToJs=JSON.parse(response.responseText);
console.log('resp data-',backToJs);
//console.log(backToJs['QueryResult'].Results);
},
failure: function(response) {
console.log('ajax call failure');
}
});
}
}
}
ご質問やペースト、更新/編集するhttps://stackoverflow.com/posts/45628458/editを使用してくださいあなたのブラウザのdevtoolsコンソールに表示されている正確なエラーメッセージに表示されます。 – sideshowbarker