Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

244
Vistas
Axios request not acting like Postman request?

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: enter image description here

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?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda