You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that for the "responded" event I get responseCode -1 and the data property contains values from the server.
The "complete" event gets responseCode 200, however there is no data property in the event object.
I would like to check if the responseCode is 200 and then get the data inside either "responded" or "complete".
I can work around the "issue" by doing the following:
letdata=null;task.on("responded",(e)=>(data=e.data));task.on("complete",(e)=>{if(e.responseCode==200){console.log("We have data",data);}});
This seems a little weird to me, is it intended to work like this?
The text was updated successfully, but these errors were encountered:
TNS version: 6.7.4
tns-ios version: 6.5.2
nativescript-background-http version in package.json: "^4.2.1",
I'm testing on a physical iOS device, running iOS 13.
I have setup event listeners for "responded" and "complete"
I see that for the "responded" event I get
responseCode
-1 and thedata
property contains values from the server.The "complete" event gets
responseCode
200, however there is nodata
property in the event object.I would like to check if the responseCode is 200 and then get the data inside either "responded" or "complete".
I can work around the "issue" by doing the following:
This seems a little weird to me, is it intended to work like this?
The text was updated successfully, but these errors were encountered: