javascript - X-API-KEY headers autentication Angularjs -


i working on project api centred application. restapi build on code igniter in php. part works great, able receive data using postman plugin , authenticate api key.

i know how receive or post data angular, have no idea how start authentication.

i cant find information on internet related x-api-key that's reason why asking question here. front-end going use angularjs. don't know when start. question is:

how authenticate headers using angularjs. appreciate if point me resources can reading.

kind regards.

you can set default header during module's run function , later check on server.

module.run(function($http) {    $http.defaults.headers.common.authorization = 'basic ymvlcdpib29w'  });

you can check documentation $http service in angular here.


Comments