zmb3 / spotify

A Go wrapper for the Spotify Web API
Apache License 2.0
1.33k stars 284 forks source link

auth: remove contextwithHTTPClient #179

Closed StalkR closed 2 years ago

StalkR commented 2 years ago

Setting a custom Transport with no ability for the caller to configure it breaks the ability to configure an http proxy, while the default behavior via http.DefaultTransport is to support it (via env), see https://pkg.go.dev/net/http#RoundTripper.

This was added because Spotify didn't support HTTP/2 in 2017, but it does now. Also, Go net/http should auto negotiate better.

strideynet commented 2 years ago

Thanks for raising this.

20 documents the original implementation of this. (for my records)

I'll review this tonight potentially, as obviously this is quite a significant change and I just want to ensure this doesn't break anything.

strideynet commented 2 years ago

Tested this locally. All seems to work nicely.