by gee_totes on 6/5/18, 2:55 AM with 44 comments
by stirner on 6/5/18, 5:53 AM
$ 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...
by tlrobinson on 6/5/18, 5:49 AM
require("express")().get("/:status", (req, res) => res.status(req.params.status).end()).listen(80)
by hamandcheese on 6/5/18, 4:33 AM
by xurukefi on 6/5/18, 7:16 AM
by dmlittle on 6/5/18, 4:11 AM
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.
by Gobd on 6/5/18, 3:54 AM
by Boulth on 6/5/18, 5:52 AM
by Fej on 6/5/18, 4:38 AM
(Response code 418.)
by fluxsauce on 6/5/18, 3:48 AM
Cool project!
by dweekly on 6/5/18, 4:07 AM
by quickthrower2 on 6/5/18, 10:43 AM
by greglindahl on 6/5/18, 5:02 AM
Better: if a query causes your webserver to crash, does nginx crash ALL of them while retrying that bad query? :-)
by sirsuki on 6/5/18, 4:39 AM
by Walkman on 6/5/18, 6:26 AM
by alex_suzuki on 6/5/18, 6:02 AM
by 7ewis on 6/5/18, 9:29 AM
This will be useful to make sure my script works correctly!
by doughj3 on 6/5/18, 4:22 AM
by est on 6/5/18, 3:47 AM
by hidiegomariani on 6/5/18, 8:46 AM
by avip on 6/5/18, 10:54 AM
by anonlastname on 6/5/18, 5:19 PM