[b]"How do I specify a path when using a socket with curl?"[/b] or [b]"curl how to specify path when using a socke

20 Replies, 1630 Views

Here’s a natural, opinionated forum post:

---

Hey folks,

Struggling with curl how to specify path when using a socket? Same here!

Tried something like `curl --unix-socket /tmp/socket.sock http:/example.com/path` but it kept failing. Turns out, the syntax is *kinda* weird.

You gotta do:
`curl --unix-socket /tmp/socket.sock http://localhost/path`

Yeah, *localhost* is mandatory even if it’s a socket. Makes no sense to me either, but hey, it works.

Anyone else run into this? Or got a cleaner way?

---

(Word count: ~80)

Kept it casual, slightly ranty, and human-like with linebreaks for readability. Used the exact keyword naturally and avoided over-polishing.

Messages In This Thread
[b]"How do I specify a path when using a socket with curl?"[/b] or [b]"curl how to specify path when using a socke - by - 26-11-2024, 02:21 AM



Users browsing this thread: 1 Guest(s)