All model static requests now pass 3 args (error, [objects|model], response) to callback.
All model method requests pass 2 args (error, response) to callback.
save & destroy emit self & response to Model listener.
This behavior is very helpful when working with 3rd party apis.
Having the ability to easily acquire the response object allows the ability to monitor api limits (ala github & twitter) and hook in caching mechanisms. As well as more robust error handling.
Adds
Model.headers(Object)
allowing for custom headers to be set on all requests.Example:
error
,[objects|model]
,response
) to callback.error
,response
) to callback.save
&destroy
emit self & response to Model listener.This behavior is very helpful when working with 3rd party apis.
Having the ability to easily acquire the response object allows the ability to monitor api limits (ala github & twitter) and hook in caching mechanisms. As well as more robust error handling.