This site was very helpful when I refractored a program from using libcurl to cpprest. I used it to make sure the sent http request headers where exactly the same.
I'll remember that next time. I been using fiddler to see websites http traffic which is helpful. But my programs http traffic doesn't show up there.. So ill try wireshark next time.
Instead of specifying the requested HTTP code in the URL path, I put the requested HTTP code in the URL query, basically ignoring the URL path. In that way, the URL path -- the resource identification in a REST-styled API -- can stay whatever you want as you're specifying the requested status code as query parameter. This made testing a program that uses resources in a REST API easier, as I don't need to rewrite the URL path, but just require to add a query parameter in my test code.
Oh, and also other request types are specified in the URL query, such as a delayed response: http://example.com/resource/id?delay=0.5, which returns a 200 after 0.5 seconds.
Besides, 1223 isn't specified by the HTTP RFCs, nor is it returned anywhere except from a library call in a buggy library. I'd say it's not appropriate for an HTTP testing service to support 1223.
For local testing I often run pathod (http://pathod.net/), which can not only yield arbitrary response codes based on the request URL, but randomly generated headers and body and even timeouts.
Weird, it doesn't implement "HTTP 451 Unavailable For Legal Reasons" or "HTTP 420 DAB Session". It also doesn't return an Allow: header for 405. It also doesn't return 100-103.
While that list is handy for sure, the OP's site also enables you to actually get the HTTP status code of your desires, since you can specify it in the request URL path: http://codes.io/304. This will return a `304 Not Modified` response, which can be helpful in writing testcode for your API service.
interestingly, i believe your sample code would, in all but the latest version of Rails, leave someone open to some of the Rails CVEs that just got announced yesterday :)