Closed yaojunWang closed 6 years ago
@nolimits4web Thanks for advice.I updated the libs to 2.0.10 , but still not working. Is there any limit to the length of the parameter?
Do other POST requests work in your Android app? You need to check debug console to see what is the issu
Thanks.I find the answer here
This is a (multiple allowed):
[x] bug
[ ] enhancement
[ ] feature-discussion (RFC)
Framework7 Version: 2.0.6.
Framework7-Vue Version: 2.0.0.
Platform and Target: Android 6.0 Android 7.0 iOS 11.2.6.
What I did
/*a base64 encoded jpeg image.*/
var img ='XXXXXXXX';
var param = {};
param.contentBase64=encodeURIComponent(img);
app.$request.post(
/* url */
'http://stbs.market.alicloudapi.com/word/entity/recognize',
/* data */
param,
/* success */
function (data) {
if(data.success){
alert(data.data[0].contents)
}else{
console.log(data);
}
},
/* error */
function(err){
console.log(err)
},
/* dataType */
'json');
Expected Behavior
It works correctly on all platform.
Actual Behavior
It works correctly on iOS to show the result json's contents, but call error callback on Android6.0 and Android 7.0.
The error callback object like this: