var authOptions = {
method: 'POST',
url: url,
data: options.data,
headers: options.headers,
json: true };
return axios(authOptions)
.then(function(response){
console.log(response.data);
})
.catch(function(error){
console.log(error);
});
This is my code snippet. I am trying to make a request to an URL which works fine in my local system. But, when I am running this code inside a windows-server, the JSON returned is incomplete and truncated. It throws an error, unexpected end of JSON. I have tried using the node-rest-client and request as well, but the error persists. any insights into this issue ?
TIA