Add access_token in backbone.js
backbone.js, javascript, rest
Solution
Okay, I think I found a way how to do it in jQuery.
$.ajaxSetup (
{
data: { access_token: 'my_access_token' }
}
);
Problem
In my REST server, it's requiring the access_token to be present in every request. i.e. in POSTing data, access_token needs to be submitted together with the attributes. How do I configure backbone.js to add access_token to every GET, PUT, POST and DELETE request? Thanks.