AmpersandJS / ampersand-sync

Provides sync behavior for updating data from ampersand models and collections to the server.
http://ampersandjs.com
MIT License
20 stars 28 forks source link

don't stomp ajaxConfig.headers when passing in options.headers #29

Closed aaronmccall closed 9 years ago

aaronmccall commented 9 years ago

Right now, when sync is called like so: model.sync('patch', model, { headers: { "if-unmodified-since": "Tue, 18 Nov 2014 21:32:47 GMT"}}) any headers defined in ajaxConfig will not be included in the request.

aaronmccall commented 9 years ago

I modified my extension to pick up ajaxConfig headers and merge them with its own default options.headers. @HenrikJoreteg, you convinced me. :smile: