5 ms·
Show HN: Statuscoder, easily get any HTTP status code for testing
I recently wanted to test how a part of a web app responded to a 502 HTTP status code from a remote site from which it was pulling data. When I came to test it, the remote site was working fine, but I still wanted the 502. So I created statuscoder, just append your desired status code to the URL and it'll respond with that code.
http://statuscoder.com
It's my first single-use project and I like its simplicity - it does one job and (hopefully) does it well. Is there anything else that you'd want to see it do?
- Herald_MJ 14y agohttp://httpstat.us http://httpstat.us does this too.
- mcpherrinm 14y agoBad SSL configuration on this server. Looks like it's missing an intermediate certificate. Instructions for the site owner are here: http://www.alphassl.com/support/install-root-certificate.html http://www.alphassl.com/support/install-root-certificate.htm... I'm not adding an exception to view it, and non-SSL redirects to SSL.
- spicyj 14y agoWorks fine in Chrome on my Mac.
- ElliotMingee 14y agoWorks fine on Chrome 19 with Windows 7
- ajack 14y agoOops, didn't pick up on this - it works fine on my machine (without adding exception). I've removed the non-ssl redirect while I get it sorted. Thanks for the heads up :)
- mcpherrinm 14y agoIntermediate certificates are easy to mess up, and they don't always show up for everyone as a problem. Just thought I'd help out! Test with `curl' is where I noticed it broken -- seems to work in Chrome, possibly because they cache intermediate certificates or something? ~% curl 'https://statuscoder.com/ https://statuscoder.com/ curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- ajack 14y agoSSL fixed now, thanks :D
- Alan01252 14y agohttps://statuscoder.com/418 https://statuscoder.com/418 Thanks you made me smile. :) Can I ask you what your motivation for this project is?
- ajack 14y agoA part of our core app at work pulls in data from a remote source and the other day the remote server was giving a 502. When I came to test it, everything was fine again but I fixed the problem and wanted to see how it reacted again to a 502. I thought it'd be nice to have something where I could specify a status code and get that code back.
- smoyer 14y agoThis is a great idea ... Thanks for sharing your test rig. Obviously this can't really be ad supported so maybe a network of us could donate bandwidth if it becomes an issue.
- nigma 14y agoAlso http://httpbin.org/ http://httpbin.org/. It can handle more test cases and the source code is on github.
- prodigal_erik 14y agoI'm not very familiar with X-Frame-Options and X-XSS-Protection headers. Do they actually do anything for errors or empty responses, or does this stack just add them by default?
- nja 14y agoThis is pretty cool! I'm just disappointed that 420 doesn't say Enhance Your Calm, but then again, you're not Twitter https://dev.twitter.com/docs/error-codes-responses https://dev.twitter.com/docs/error-codes-responses