Pattern to configure AJAX requests