I have the below piece of code used for a bootstrap typeahead.
return $http.post(searchClients, {
params: {
clientName: val,
}
}).then(function(response){
return response.data.results;
});
I need to add a token to the header. How do I go about adding the token to the header?
searchClients holds the URL which is defined elsewhere. this code works, I just need to know on how to some extra info in the header.