You can use head
to build header-only responses. The Rails guide is very helpful in pointing out that you can send a :bad_request
or :created
header. Where is a list of all of these Rails HTTP header aliases?
Have a look at Rack::Utils::HTTP_STATUS_CODES, it's used by Rails to set the status codes. To have the symbol, just "downcase" and "underscore" the hash values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With