My computer is connected to two different networks. Internet through ethernet and a local network through wifi on a different network card. The local network serves a webpage at 192.168.1.1.
I can access the local network at 192.168.1.1 through my browser, or even through postman requests. However, when I try to send HTTP requests to it through code it either times out or I get the following response:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache/2.4.51 (Win64) PHP/7.0.33 Server at localhost Port 80</address>
</body></html>
I'm assuming the server running on 192.168.1.1 doesn't support non-browser connections or something? I have tried using both NodeJs and powershell.