How to add multiple headers in Angular 5 HttpInterceptor

后端 未结 6 695
情话喂你
情话喂你 2020-12-09 15:16

I\'m trying to learn how to use HttpInterceptor to add a couple of headers to each HTTP request the app do to the API. I\'ve got this interceptor:



        
6条回答
  •  隐瞒了意图╮
    2020-12-09 15:36

    I have tried following ways to send custom headers using interceptors. please check the link stackBlitz

    Please refer the console screenshot for your reference browser console-request header

    And the custom headers are added in

    access-control-request-headers:authkey,content-type,deviceid

    I want the headers to be added as part of header, not inside access-control-request-headers. Please suggest me on this

提交回复
热议问题