Reputation: 100370
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?
Upvotes: 0
Views: 309
Reputation: 44
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
Upvotes: 1