假设我有一个使用node.js网络包的tcp服务器:
const s = net.createServer(conn => {});
s.listen(6969, '0.0.0.0', () => {
});
有没有办法以某种方式使用HTTP GET请求命中服务器?也许有一种方法可以让http服务器在同一进程中使用相同的端口?
对于HTTP连接,使用telnet连接到端口 - 并发送HTTP命令
https://superuser.com/questions/933346/how-does-one-browse-a-website-using-telnet
对于HTTPS连接,请使用openssl s_client
https://www.feistyduck.com/library/openssl-cookbook/online/ch-testing-with-openssl.html