ブラウザ クライアントがあり、サーバー側には DataSnap REST サーバー アプリケーションがあります。JavaScript クライアントを認証したい。このガイドに従っています: http://docwiki.embarcadero.com/RADStudio/en/Authentication_with_a_JavaScript_Client
...
function doEcho()
{
var userName = document.getElementById("namefield"); //get the user name from the form
var password = document.getElementById("passwordfield"); //get the password from the form
//create the proxy instance with the specified user credentials
var Proxy = new TServerMethods1(getAuth(userName, password));
var Response = Proxy.EchoString("Hello World");
//Will show an error message if authorization failed,
//or the JSON Object of parameters if successful
alert(Response.toJSONString());
}
...
問題は、ユーザー名とパスワードの資格情報が間違っている場合、Respocnse がただnull
. リクエストステータスコードなど、何が起こったのかについての詳細情報を取得するにはどうすればよいですか?
Datasnap REST サーバー アプリケーションで JavaScript 認証を行った人はいますか?
前もって感謝します