plugins version:
"tns-android": {
"version": "2.5.0"
}
"nativescript-background-http": "^3.0.0",
java
```java
@RequestMapping(value = "/appUploadImage",method= RequestMethod.POST)
public List
InputStream inputStream = request.getInputStream();
UploadFileVo uploadFileVo = uploadService.saveFile(inputStream);
return Lang.list(uploadFileVo);
}
the upload is success,but can't get the return value
I want to get the return value `Lang.list(uploadFileVo)`
js
```javascript
task.on("complete", function(e,response){
console.log('response')
console.dump(response)
});
response is null,
@giscafer the issue is related to incompatible versions of the used plugin and NativeScript
nativescript-background-http 3.x.x and above will work with NativeScript 3.x.x and above.
If you want to use background-http with NativeScript 2.5.x then use a compatible version.
To see all published versions use the following:
npm view nativescript-background-http versions
and then you can install the wanted version with
tns plugin add [email protected]
or just revise your package.json, delete node_modules and rerun npm install
thks , i just found the solution
event responded ,not complete
task.on("responded", function(e){
console.log('responded')
console.log(e.data);//the data is backend return value
});
@NickIliev One thing I have been doing with any plugins that have been upgraded is listing in the docs what the last version that is compatible with 2.5.x is. This way it is easy for the end user to copy the tns plugin add [email protected] right from the docs and makes it less likely I'm dealing with support issues because of 2 vs 3 compatibility.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@NickIliev One thing I have been doing with any plugins that have been upgraded is listing in the docs what the last version that is compatible with 2.5.x is. This way it is easy for the end user to copy the
tns plugin add [email protected]right from the docs and makes it less likely I'm dealing with support issues because of 2 vs 3 compatibility.