Allow output format to be switched based on request extension.