Home > Net >  get html from website using express returns invalid header value char
get html from website using express returns invalid header value char

Time:10-13

I'm trying to get a website using express, and then send back the html to the application as a string.

It's working with google.com. However, it doesn't work with all sites.

the error is "Parse Error: Invalid header value char"

I'm not sure it's even making the request out.

I'm a beginner when it comes to this, any help is appreciated.

CodePudding user response:

Have you tried specifying your Content-Type header value to text/html? Or can you please update your question to include your server.js so that we can see your code?

  • Related