csv応答を取得できないという問題が少しあります。
このデータを取得しようとしていますが、応答の特殊文字に問題があります。
データを正常に受信しましたが、jQueryがデータをデコードしようとし、構文エラーが発生しました。私の要求は次のとおりです。
$.ajax({
url: 'http://toolserver.org/~daniel/WikiSense/Contributors.php?wikilang=en&wikifam=.wikipedia.org&page=Cloud+computing&since=&until=&grouped=on&order=-edit_count&max=1000&order=-edit_count&format=csv',
dataType: "script",
success: function(data){
alert('success');
},
error: function(test1, test2, test3) {
alert('error');
}
});
エラーは(%文字を指している)です
SyntaxError: syntax error
1004+%28922%2F82%29,SamJohnston,2008-07-26+09%3A40,2013-03-07+18%
また、データをデコードしないように、dataTypeをtextに設定しようとしました。この場合、ajaxリクエストでエラーが発生します。
$.ajax({
url: 'http://toolserver.org/~daniel/WikiSense/Contributors.php?wikilang=en&wikifam=.wikipedia.org&page=Cloud+computing&since=&until=&grouped=on&order=-edit_count&max=1000&order=-edit_count&format=csv',
dataType: "text",
success: function(data){
alert('success');
},
error: function(test1, test2, test3) {
alert('error');
}
});
.ajax()パラメーターcontentType、dataType、scriptCharsetなどを試してみました。役に立ちません。