ng2-http
ng2-http copied to clipboard
Headers overriding
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
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
As far as I understood from sources only appending is applied but no replacing. But can be wrong. Doesn't work anyways))
Thanks, I’ll investigate
Thank you very much!!!