Return html or json depending on the request