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.
When calling
catalog.NewClient(WithToken("AUTH TOKEN"))the functions updates thehttp.DefaultClient.Transportwith a newhttp.Roundtripfunction.This means any other call using
http.DefaultClient, includinghttp.Get()andhttp.Post(), as they are wrappers ofhttp.DefaultClient, also call thehttp.Roundtripfunction so overriding any Authorization Header set.I think
catalog.Clientneeds to either make a clean copy ofhttp.DefaultClientor use&http.Client{}for it'shttpClient.