Return JSON or HTML response based on request's header

In contrast to #6's all or nothing approach, we returns appropriate content type based on user's request header.