0

I need to make one ajax call, then based upon what's received possibly make another. Is there a better way to user jQuery deferreds than what I have here?
var doThingOneOrTwo = function () {
var url1 = "url1.php";
var url2 = "url2.php";
$.when(
$.ajax({
url: url1
}))...