Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

252
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!