Responds to JSON and HTML