| |
TIL: You can make HTTP requests without curl using Bash /dev/TCP
Bash can make HTTP requests directly using `/dev/tcp/host/port` redirection, allowing users to perform simple GET requests without curl or wget in stripped-down environments like minimal Docker containers. The technique involves opening a TCP socket with `exec` and writing HTTP headers manually, though it lacks HTTP client features like TLS, redirects, and compression. This is a bash-specific feature useful for quick debugging and connectivity checks in resource-constrained systems.
Read Full Article →
← More Tech news