how to set a custom header on the request?



how to set a custom header on the request?..

Answer / Vijay Kumar

To set a custom header on a request in AngularJS, you can use the $http service's config object. Here is an example: `$http({url: '...', headers: {'Custom-Header': 'Value'}});`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

What is the difference between angular 1 and angular 2?

1 Answers  


How to make Http get request from AngularJS with an example?

1 Answers  


Explain spa architecture in angularjs?

1 Answers  


What is a routing in angular js?

1 Answers  


What is event distner and host distner in angular?

1 Answers  


How will you explain auto bootstrap process in angularjs?

1 Answers  


What is angular cli?

1 Answers  


How does oauth 2.0 work?

1 Answers  


How to debug AngularJS app in browser?

1 Answers  


How to hide or show a div in angularjs?

1 Answers  


What is lazy loading angular?

1 Answers  


What is the use of ng-cloak directive in angularjs?

1 Answers  


Categories