What I am getting at is that you can't form a url that will do this, you need to interact with the page to trigger it.
$ curl -I https://status.icu/418/
HTTP/1.1 500 Internal Server Error
The Nginx configuration responsible for the service[1] just hardcodes a handful of common HTTP status codes. A Go version that supports any status code takes fewer lines than status.icu's nginx.conf, even after gofmt.[2] Not that I think anyone should be relying on a third-party service for "writing browser integration tests" OR "mocking API responses".[1] https://gist.github.com/geetotes/0ddc96f95eecab4e8aa8dd53bcc...
[2] https://gist.github.com/wwalexander/febbc1ba76c8eafa9f94f5cb...
[1] https://gist.github.com/joshmn/66f715c65bc19784f95a0e2ce3c9d...
Most "one liners" fall under the category "most people would format very differently"
And this one at only 140 chars (a classic tweet)
require("express")().get("/:status", (req, res) => res.status(req.params.status).end()).listen(80)Unless you mean "what guarantees do I have that if I integrate this in my workflow it won't be gone tomorrow?". In which case, I agree.
(Response code 418.)
There used to be a similar service hosted on the same domain that eventually went dead. I bought the domain and brought up this service again. It barely gets used (haven't checked usage in a while) but I've already paid for the domain and it costs me pennies to keep it up and running.
Cool project!
Better: if a query causes your webserver to crash, does nginx crash ALL of them while retrying that bad query? :-)
This will be useful to make sure my script works correctly!