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

116
Views
Use node-fetch v2.6 to get HTML of a website

Currently my code is the following:

const fetch = require("node-fetch");

(async function () {
  console.log(await fetch("https://a.website.in-ht.ml"));
})()

However, It is only returning data on the website, as opposed to the HTML. Anyone know what the issue may be?

(As the title says, I am using v2.6 not 3.0+)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try this:

const fetch = require("node-fetch");

(async function () {
  const res = await fetch("https://a.website.in-ht.ml")
  const html = await res.text()
  console.log(html)
})()

This takes the text response instead of the full response.

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!