ng2-http icon indicating copy to clipboard operation
ng2-http copied to clipboard

Headers overriding

Open AILazerka opened this issue 8 years ago • 4 comments

Hello!

When implementing service for backend requests I've found out that it'll be great to have feature when you're adding Headers decorator to the method with an opportunity to override headers from DefaultHeaders which are on class. Mostly I'm using application/json as the Content-Type but for several methods I want to use another. Currently ng2-http is appending existing comma-separated list of values in one string.

p.s. it's a suggestion for improvement

AILazerka avatar Oct 04 '17 12:10 AILazerka

Good catch. The intended use case is for local headers to override the defaults. If that’s not happening already this is definitely a bug

hboylan avatar Oct 04 '17 13:10 hboylan

As far as I understood from sources only appending is applied but no replacing. But can be wrong. Doesn't work anyways))

AILazerka avatar Oct 04 '17 13:10 AILazerka

Thanks, I’ll investigate

hboylan avatar Oct 04 '17 13:10 hboylan

Thank you very much!!!

AILazerka avatar Oct 04 '17 13:10 AILazerka