move all REST responses except HEAD to JSON

HEAD responses SHOULD include the same content-type that the real response would have, although this is mainly just spec lawyering. We should set the content-type to json on success, and probably shouldn't use http.Error since this is a different code path than GET requests use.