My server has a manual authorization. I need to put the username/password of my server to my backbone request inorder for it to go through. How may i do this? Any ideas? Tha
The easiest way to add request header in Backbone.js is to just pass them over to the fetch method as parameters, e.g.
MyCollection.fetch( { headers: {'Authorization' :'Basic USERNAME:PASSWORD'} } );