This would never be for production, but for development only. What I would like to do is override what I think is the sync method (when you do model.save
, model.update
and model.destroy
) to then pass in the api key that the developer provides in their config.development.js
file.
I have read other stack questions where you can over ride the sync method because its just an ajax request but I haven't seen any that give examples where you can do this or even where you would place this "over write"
What I am looking for is example, documentation anything that lets me pass in extra headers for things like delete, post, put, update and patch and still keep things restful.
The only request that doesn't need the api key is GET requests.