$.getJSON is a shorthand for
$.ajax({
dataType: "json",
url: url,
data: data,
success: success
});
So you can simply use it directly like
$.ajax({
beforeSend: function(request) {
request.setRequestHeader("X-Mashape-Key", 'key_here');
},
dataType: "json",
url: settings.apiPath + settings.username + '/boards/',
success: function(data) {
//Your code
}
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…