3 ms·
You echo the request into /www/url and cat the response from it
by oneplane 4y ago
You echo the request into /www/url and cat the response from it
- enriquto 4y agoor even better, to avoid state, the url "file" is executable and you pipe through it: /www/url < request > answer
- theamk 4y agothat already exists, the command is "wget -i - -o -"
- stusmall 4y agoHow does it know where to send it? Does it just assume it should use the contents of the Host header and send the request there or is the "url" in your path the destination? Does it support things like SNI?[1] Can you spoof that? Does it expect clients to parse out the raw output of the HTTP response? I have so many questions. From a quick glance this seems a lot harder to work with than curl for both trivial and non-trivial uses. I tried to find docs on it, but couldn't. If you could link me to some, I'd appreciate it. [1] After posting this I remember like a doofus this is an OS from the 90s. Of course it doesn't. But a similar question could be asked about any other TLS level setting. That's just one I've had to spend more time debugging using curl in the past.
- seiferteric 4y agoTo be fair you'd probably end up with a tool like curl just for setting all the options and headers, but it would just be a wrapper around sending the request to the url file. Just like there are tools for reading and parsing files in /proc.
- deleted 4y ago[deleted]