0

Say I have a tcp server using node.js net package:

 const s = net.createServer(conn => {});

 s.listen(6969, '0.0.0.0', () => {

 });

is there a way to hit the server using an HTTP GET request somehow? Perhaps there is a way for an http server to use the same port in the same process?

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817

1 Answers1

1

For HTTP connections use telnet to connect to the port - and send the HTTP commands

https://superuser.com/questions/933346/how-does-one-browse-a-website-using-telnet

For HTTPS connections use openssl s_client

https://www.feistyduck.com/library/openssl-cookbook/online/ch-testing-with-openssl.html