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.
---
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.
