Skip to content

Catalog Client overriding http.DefaultClient.Transport #56

Open
@andy-mcgrath

Description

When calling catalog.NewClient(WithToken("AUTH TOKEN")) the functions updates the http.DefaultClient.Transport with a new http.Roundtrip function.

This means any other call using http.DefaultClient, including http.Get() and http.Post(), as they are wrappers of http.DefaultClient, also call the http.Roundtrip function so overriding any Authorization Header set.

I think catalog.Client needs to either make a clean copy of http.DefaultClient or use &http.Client{} for it's httpClient.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions