dbrain / soggy

An fast and simple express/sinatra like web framework.. thing.. for Go.
45 stars 1 forks source link

Ability to send custom status codes #21

Closed dbrain closed 12 years ago

dbrain commented 12 years ago

As someone who actually cares about HTTP, I want soggy to be able to send status codes other than 200, 404 and 500. This should be done within the next day, tried using soggy on a project and quickly found I needed this, no idea how I missed.

dbrain commented 12 years ago

This is done, return an int as the first parameter and huzzah it will be set as the status on any specified return types. Note: This will not work as the only return parameter, so you can't have no response with a status code of X. If you wish to do that just WriteHeader on res with the code instead.