I'm trying to analyze this command:
$ http :"/hello"
HTTP/1.1 401 Unauthorized
<headers>
<body>
I'm trying to save the whole thing in a variable VAR=$( ... )
but to no avail so far.
If I run
$ http :"/hello" 1>/dev/null
everything disappear, so I derive that everything is standard output.
But if I try to send this to a file or to my variable, I don't see the initial portion. So I thought this was stderr
, so I did 2>&1
but this doesn't have any effect either.
How can I go about understanding this?
Thanks