TIL: You can make HTTP requests without curl using Bash /dev/TCP

Edit: This has generated a nice discussion on Hacker News – check it out too!
I needed to check that one container could reach another over an internal Docker network: a plain GET /health against a service on a shared network. The obvious move is curl http://service:8642/health. But this app image was stripped right down, with no curl or wget and nothing else around that I could use to open a socket.
评论
?
参与讨论