can we replicate curl resolve host in node-fetch or any other node http library.
curl https://www.example.net --resolve www.example.net:443:127.0.0.1
can we replicate curl resolve host in node-fetch or any other node http library.
curl https://www.example.net --resolve www.example.net:443:127.0.0.1
Copyright © 2021 Jogjafile Inc.
You don't need another lib to do this. The builtin http module works fine:
In HTTP protocol, the host name is in headers, and the IP used to establish the TCP connection is independent from that.