0
我指的是此任務的alm的官方文檔。 http://alm-help.saas.hpe.com/en/12.50/api_refs/REST/webframe.htm#sign_in.htm如何通過JQuery登錄ALM
我的代碼是
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
var USER = "username";
var PASSWORD = "password";
var auth = btoa(USER+":"+PASSWORD);
$.ajax({
type: "POST",
url: "https://example.com/qcbin/api/authentication/sign-in",
headers: {
"Authorization": "Basic " + auth
},
success : function(data) {
\t alert("suc : "+data);
},
error : function(data){
\t alert("err : "+data);
}
});
</script>
</head>
<body>
</body>
</html>
輸出
解釋什麼是問題,你期待什麼? – yogidilip
http://stackoverflow.com/questions/16465085/ajax-post-to-external-url有沒有一個原因,爲什麼你想用JQuery來做呢? – Barney
我想在我的應用程序的缺陷列表,並希望安排哪一個打開或關閉,併爲同樣我希望我的郵件調度程序報告。我必須在Salesforce.com上做 –