I have a simple Backbone.js / Bootstrap front end in HTML5 with Node.js / Restify backend. I set cookies in the header response from the server as shown below:
res.setHeader("Set-Cookie", ["token=ninja", "language=javascript"]);
On the client side, I am making a REST call as
var response = this.model.fetch().success(function(data){
}).error(function(data){
}).complete(function(data){
});
which calls the analysis method in the model.
How can I read the cookie value in the model?
source
share