HEAD requests are useful for testing existence of databases and documents, so I've added them as HTTP methods. Only returning the headers is handled automatically by Restify, so I didn't add unit tests of the HTTP interface.
I also took the opportunity to consolidate requires in instances where the handler function is used more than once.
Thanks! Yes, I still don't have tests for the HTTP interface, pretty much because restify handles that, but I'll add such tests eventually. Thanks again!
HEAD requests are useful for testing existence of databases and documents, so I've added them as HTTP methods. Only returning the headers is handled automatically by Restify, so I didn't add unit tests of the HTTP interface.
I also took the opportunity to consolidate requires in instances where the handler function is used more than once.