restwebservice を介して base64 イメージをサーバーに送信しようとしています。問題は、logcat でエラーが発生せず、サーバーにヒットしていないことです。サーバーの URL は正しいです。そして、webappを使用してサービスをテストし、正常に動作しました。しかし、phonegapではその問題
function Test() { アラート(imgByte);
/**imgByte is in base64 format -->pic.src = "data:image/png;base64," + imageURI;
imgByte = pic.src;*/
$.ajax({
type : "POST",
url : IMGURL,
data : {
image : imgByte
},
delay : 3,
dataType : "text",
cache : false,
error : function(xhr, ajaxOptions, thrownError) {
debugger;
},
success : function(response, status, xhr) {
alert("haiSuccess1");
response = xhr.responseText;
var responseArray = JSON.parse(response);
if (responseArray.status == "success") {
alert("haiSuccess");
}
}
});
}