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

254
Vistas
How to extract status code of a protected web page with Node.js backend?

I am trying to only access a webpage's returned status code but the page is proctected by a login process.

I already have the credentials but I cannot directly send http request and see the status code because it returns HTML of login page.
I need to find a way such that when I send http request to that web service, it should go through those login process and return me only status code.

An advised way is that using scripted browser, but still even if I successfully login to that page and display it, how can I send status code to my local backend ?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If the logon process consists of just giving the correct username and password, you can "fake" it with a single request like

fetch("https://protected.page/login", {
  method: "POST",
  headers: {"content-type": "application/x-www-form-urlencoded"},
  body: "username=you_know_it&password=you_know_it&submit=Logon"
}).then(response => response.status);

But if login involves one-time tokens or captchas, this is of course not sufficient.

about 4 years ago · Juan Pablo Isaza Denunciar
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