ヘッダーなしで応答コンテンツ (本文のみ) を抽出するにはどうすればよいですか?
$.ajax({
type: "GET",
url: "http://myRestservice.domain.com",
success: function(data, textStatus, request){
alert(data); //This prints the response with the header.
},
error: function(){
alert('fail');
}
});
上記のコードが出力されます
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 12 Jul 2013 20:24:06 GMT
Content-Length: 232
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">{"UserID":3,"RoleID":8,"ActivityID":3,"RoleIName":"E",,"Duration":10,"ValidationMsg":"Passed"}</string>
ValidationMsg の値を抽出する必要があります。レストサービスコールです。
ヘッダー情報なしで応答を取得するにはどうすればよいですか?