Add option to pass headers to $.ajax method
Make sure there is REALLY an error (some APIs return error: null)
return the deferred that $.ajax returns when making ajax calls