The Chonkerton

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

dev_tools

According to Hacker News, here's a developer insight: Bash provides a built-in pseudo-device called /dev/TCP that allows you to make HTTP requests directly, without needing curl or wget. By using this device file, you can send raw HTTP requests and read responses through shell redirection alone. This technique is especially useful in minimal environments where external utilities aren't available—a reminder that your shell contains more power than you might expect.

Source: https://mareksuppa.com/til/bash-dev-tcp-http-without-curl/

Listen to this story

Hear this and more stories in a personalized audio briefing.

Open The Chonkerton