I'm trying to grab the HTML content of a page, after submitting form data as part of the request. In Postman, I make a POST request to https://forms.n-somerset.gov.uk/Waste/CollectionSchedule with the following x-www-form-urlencoded data
'Postcode': '-',
'SelectedUprn': '24011054',
'PreviousPostcode': '-',
'PreviousHouse': ''
In Postman, I can see the page has the correct data loaded into it:

If I then take the generated Axios request from Postman and run this in Node, the HTML content of the page is different, in that it shows the form which would show if you made a GET request instead
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'Postcode': '-',
'SelectedUprn': '24011054',
'PreviousPostcode': '-',
'PreviousHouse': ''
});
var config = {
method: 'post',
url: 'https://forms.n-somerset.gov.uk/Waste/CollectionSchedule',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': 'ASP.NET_SessionId=ozx3vvgzsa1tq4okyllzmway'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Does anyone know why the request in Postman works, but doesn't in Node using Axios?