Skip to content

Override headers not working #11

@masiorama

Description

@masiorama

Hello, I'm trying to add auth header to my request, but it seems it gets lost at this point (ngx-request.js):

NgxRequest.prototype.setHeaders = function (headers, override) {
        this.headers = new http_1.HttpHeaders(Object.assign(headers, override));
        return this;
};

headers param is correctly populated with
Object {Authorization: "Bearer 2f8e3907-93c5-4cd1-a81b-554d4811a675"},
and override param is undefined.
The problem is at the point when the script create the new http_1.HttpHeaders object.

The returned object has:

HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: }

Any hint? Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions