joepie91 / node-bhttp

A sane HTTP client library for Node.js with Streams2 support.
62 stars 12 forks source link

Feature Request: Custom Resolver #32

Open hdon opened 7 years ago

hdon commented 7 years ago

So I'm trying to test some HTTP servers without setting up DNS to perform the task.

I tried specifying the Host header and passing a URL like "http://1.2.3.4/" using just the server's IP address.

I'm running into simple redirects (e.g. adding "www." to hostname.)

This sort of redirect loops infinitely, I believe because the "Host" header is overwritten for every request.

If there were an option for a custom resolver function, that would fit my use-case very nicely.

Thanks!