14 comments

[ 2.7 ms ] story [ 25.5 ms ] thread
As an exploration of Svelte (v3.svelte.technology), I designed and build this fairly simple website that solves a problem I have often - quickly finding HTTP status code info.

It's pretty simple, but I think it can actually be a fairly useful tool in my workflow and I hope the workflows of others. I'd love to hear some feedback!

It's easy to use and super fast, especially considering my previous workflow was:

- Encounter a status code in some code

- Find the Wikipedia article on HTTP status codes

- Press Ctrl-F

- Type in the status code

- Hit return

- Read the explanation

Now it's much quicker for me. I might also make a Visual Studio Code extension to make the process even faster.

I'd love to hear some feedback!

(comment deleted)
Nice! It looks like it reduces your steps to:

- Encounter a status code in some code

- Go to https://statuses.now.sh/

- Type in the status code

- Read the explanation

That's 66% of the steps. It's harder to remember that URL than wikipedia though. You could remove a step if you could easily put the number in the url without having to remember the "code" query param. Just go directly to https://statuses.now.sh/418.

I live in the terminal. If I'm investigating a status code then I have a terminal open. That's not true for everyone, but it'd be super cool if I could `curl https://statuses.now.sh/418` and get plaintext information about the status right from my terminal! You could implement that by checking the user agent to see if it's curl/postman/etc.. or requiring a .json or .txt extension at the end. Either way, it'd cut my workflow down to three steps:

- Encounter a status code in some code

- `curl https://statuses.now.sh/418`

- Read the explanation.

It also allows me to set an alias/function in my bashrc so that I don't have to remember the url.

As for the svelte part, I haven't used it and don't really do frontend dev very often...but I bet you'd get more specific feedback on the code itself if you listed a git repo people could use to check things out.

That would be a great idea! Thanks for the recommendation. I'll get to implementing that ASAP.
Also, you don't have to type in the url if it's a bookmark ;) But same with Wikipedia But then it makes it as easy to remember
How is this better than https://httpstatuses.com/
Well that site only shows me one status code. It's a 522 generated by cloudflare because they can't contact the host.
I've been a fan of https://httpstat.us/ for a while now. Pretty much the same thing only you can also ask for a specific response time, which can be useful for testing timeouts.
This assumes I care about a status code in isolation when, in fact, they are grouped or related.

If selecting a status code, or if faced with one, I want to see that relationship.

It's a fun project but it might be a bit over engineered. I think it'd have to be at least as good as a list.

I do also love status code lists or references (like MDN), but this site is really for a quick reference.

For example, I'm communicating with an API in JavaScript and it gives me a status code - I can just go to the site and type it in, and I get a little bit of info right away.

I might also add a MDN or Wikipedia link.

Hi, permalinks might not be working at the moment (I tried with a 204)