I am making a native app using Nativescript-Vue,in my first component I am launching a simple post request, which is working for sure (I tested it on desktop version). But for a reason that I ignore there is a problem with the response. My response shows me that the request has been sent successfully the parameters, but I am getting a status:null and a data:"". Does some of you know how I can fix this ?
To any person who is reading this topic, thank you for your time any lead would be appreciable :)
axios({
method: 'post',
url: url,
data: querystring.stringify({
grant_type: config.grant_type,
username: config.API_username,
password: config.API_password,
APIKeys: config.API_key
}),
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
.then((response) => {
alert(JSON.stringify(response, null, 4));
})
.catch((error) => {
alert(JSON.stringify(error, null, 4));
});