Request JSON and XML using filename extensions