Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

258
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda