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
Turns out this is not a problem with the nodejs code. Windows network settings have put some restrictions on size while receiving the data. Once those restrctions are removed, it works like charm.