TIL: You can make HTTP requests without curl using Bash /dev/TCP
- Programming
- Infrastructure
- Security
- Developer Tools
- Open Source
The post is a short demo of using Bash’s built-in `/dev/tcp/host/port` redirection to open a TCP connection and manually send an HTTP request. The setup was practical, not theoretical: a minimal Docker image on an internal network had neither `curl` nor `wget`, and the author needed a fast way to check whether one container could reach another. That framing held up. People mostly treated this as a good emergency trick for health checks, localhost probes, captive environments, penetration testing, and tiny systems where adding packages is awkward or impossible.
Keep this in your toolbox for emergency connectivity checks, health probes, and low-privilege shells. For anything unattended or Internet-facing, install or call a real client because raw Bash socket tricks skip TLS, HTTP parsing, redirects, and all the ugly edge cases `curl` already solved.
- mareksuppa.com
- Discuss on HN