Added separate methods for JSON and XML requests