使用浏览器GET请求命中tcp服务器

问题描述 投票:0回答:1

假设我有一个使用node.js网络包的tcp服务器:

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

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

 });

有没有办法以某种方式使用HTTP GET请求命中服务器?也许有一种方法可以让http服务器在同一进程中使用相同的端口?

node.js http tcp
1个回答
1
投票

对于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

© www.soinside.com 2019 - 2024. All rights reserved.