
HttpStat: It's like curl -v, with colours - guessmyname
https://github.com/davecheney/httpstat
======
philipov
> _httpstat.py is a wrapper around curl(1), which is all fine and good, but
> what if you don 't have curl(1) or python(1) installed?_

So, the point of this is if you don't have either curl or python, but you do
have golang. I can't imagine when that would happen. Is it intended for use
inside a container?

~~~
divan
Golang compiler produces static binary files, so you don't need install
anything. Just run the binary.

~~~
Rotten194
But this seems like a developer tool -- what developer doesn't have Python and
Curl installed...

~~~
Sphax
People on Windows

~~~
dogma1138
If you develop web apps on windows you'll have Pyton installed.

Also windows has power shell which has its own curl equivalent.

~~~
Sphax
the curl you get on powershell is absolutely not the same. The output of curl
-v is totally different.

And no, even if you develop web apps you don't necessarily have Python
installed. If I wrote node, or C#, or Go, or PHP exclusively, why would I
bother with Python ? Sure there are some useful tools in Python, but it's
absolutely not a given that you'll have it. Unlike on Linux, where Python is
installed by default everywhere and you can basically assume Python is
available.

------
p1mrx
Looks pretty shoddy from an IPv4/IPv6 point of view. It uses
fmt.Sprintf("%s:%s") instead of net.JoinHostPort, and net.ResolveTCPAddr
returns a single IP address instead of a properly-ordered list.

So it will probably fail to connect to an IPv6 literal, or to a dualstack
hostname from an IPv6-only client.

------
amelius
Please don't use colored output if you didn't first check the background color
of the terminal. If you can't check the background color of the terminal, then
don't use colored output.

~~~
farslan
Did you checked the code? Because it does exactly what you describe already.

------
watersb
Thanks for posting this; I live in macOS Terminal.app, which pretends to be an
xterm-256colors, and also displays lots of Unicode characters ok.

Amazed that we don't have better text-based UI, given these common
capabilities in 2016.

------
raimue
Colored output reminds me of httpie:
[https://httpie.org/](https://httpie.org/)

The timings are a nice addition, although I am not sure if there is much use
for it.

~~~
Sphax
Uh ? the timings are the only thing httpstat does; it's not a client like
httpie.

~~~
raimue
Sorry if I misunderstood the purpose. The title of this submission made it
sound like this is supposed to be a replacement for `curl -v`.

------
partycoder
Load testing tools such as Apache Bench or JMeter might be good at measuring
performance. Personally I think a single sample might not be good enough.

Otherwise you can just grab data from various requests and feed them to R.

~~~
daenney
This isn't about load testing though. This is about getting some more useful
information out of doing a request from a CLI, which can be a very handy way
to see if there's an indication of a problem with an endpoint or a specific
host.

It can be done with curl but then you also have to write a template for the
output and pass it in to curl with -w to get things like timings.

------
vnglst
Where's the JavaScript version? ;)

~~~
0xmohit
I'm waiting for a LOLCODE [0] version.

[0] [http://lolcode.org/](http://lolcode.org/)

------
dzhiurgis
Looks like a good supplement to httping

