Live data from Hacker News

Show HN: A Swiss army knife for testing HTTP from the terminal

news.ycombinator.com

1–10 of 47 posts

Show HN: A Swiss army knife for testing HTTP from the terminal

#1
Hiya HN!

Just released Artillery Probe - a Swiss army knife for testing HTTP from the CLI. Think mini-curl with better UX for common use-cases, plus a couple of extra features.

Would love for you to try it and give some feedback!

https://www.artillery.io/blog/swiss-army-knife-for-http-testing

and:

  npm install artillery@latest
What does it do?

- First of all, it's a HTTP client! It does all the usual stuff you'd expect from a HTTP client... HTTP methods, request bodies, custom headers, forms, Basic Auth etc.

- Got some JSON or XML back? It'll pretty-print it, and syntax highlight it for you.

- It'll show you request waterfalls like this one: (inspired by httpstat)

   DNS Lookup | TCP Connection | SSL Handshake | Time to First Byte | Content Transfer
    56ms      |  14ms          |     19ms      |     181ms          |   88ms          |
              |                |               |                    |                 |
              56ms             |               |                    |                 |
                            70ms               |                    |                 |
                                             89ms                   |                 |
                                                                  270ms               |
                                                                                 total:358ms
- JSON responses can be queried and sliced and diced with JMESPath (same syntax as AWS CLI) - no need to reach for jq. XML & HTML may be queried with a jQuery-like syntax too.

- You can set expectations on the response, e.g. have the CLI check that the response is a 200, or that a certain header is set, and exit with non-zero code if not. Super handy for quick acceptance testing.

We've got lots of ideas for improvements, but would love to hear what you think!

Re: Show HN: A Swiss army knife for testing HTTP from the terminal

#3
> npm install

Sorry, lost me at this part. Have a better installation story like a single executable.

Beyond that, what does this do that curl, wget, et al do not? How is your interface better than those? Is it robust in the face of errors? What http protocol versions does it support?

Re: Show HN: A Swiss army knife for testing HTTP from the terminal

#5
post #3

> npm install Sorry, lost me at this part. Have a better installation story like a single executable. Beyond that, what does this do that curl, wget, et al do not? How is your interface better than those? Is it robust in the face of errors? What http protocol versions does it support?

if you’re on a Mac, Artillery has a Homebrew formula too. We have an official Docker image too. Other ways of installing are on the roadmap too (self contained tarballs and binaries).

As to what it does better than curl/wget. Probe is geared towards interactive use with HTTP APIs. So you get syntax highlighting and pretty printing for JSON, built-in querying, request waterfall visualizations, and ability to set expectations on every response.

HTTP/2 is supported.

Re: Show HN: A Swiss army knife for testing HTTP from the terminal

#7

Nice project. How are the request waterfalls done?

thank you! we just grab the timings info for the request from the underlying HTTP library, and sprinkle some ASCII art on top. That part was inspired by httpstat [1]

We want to extend those with support for Server-Timing next, and also Core Web Vitals [3] (via Playwright) for web pages.

1. https://github.com/reorx/httpstat

2. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Se...

3. https://web.dev/vitals/

Re: Show HN: A Swiss army knife for testing HTTP from the terminal

#9

It would take me something extraordinary to move away from curl

Sure, if you've got muscle memory for all the flags (plus it lets you reason about all the other programs that pipe stuff to curl). I personally find myself using httpie [1] at least as much.

1: https://httpie.io/

Re: Show HN: A Swiss army knife for testing HTTP from the terminal

#10

It would take me something extraordinary to move away from curl

curl is amazing! I love curl. This is not meant to replace it completely. Probe just makes those most common use-cases friendlier, like looking at headers, or inspecting JSON retuned by an API with syntax highlighting, or querying without needing to reach for jq etc.
Post reply on HN