blockfrost / blockfrost-go

Golang SDK for Blockfrost.io
Apache License 2.0
23 stars 9 forks source link

Support passing a custom *http.Client #71

Closed jybp closed 9 months ago

jybp commented 9 months ago

AFAICT there is no way to currently pass a custom *http.Client to the lib. Meaning consumers have no way to configure it nor can they use custom http.RoundTrippers.
It's usually a good practice to allow that. An example of another api wrapper: https://github.com/google/go-github/blob/master/github/github.go#L312-L321

IDK if maintainers have bandwidth for this feature but I can work toward a PR if that's OK.

jybp commented 9 months ago

cc @HannesKimara

slowbackspace commented 9 months ago

Hi @jybp, if you could find the time to implement this, PR would be highly appreciated. We don't really have the capacity for diving too deep into go right now.

slowbackspace commented 9 months ago

Hi @jybp, just want to let you know that 0.2.0 is out now!

https://github.com/blockfrost/blockfrost-go/releases/tag/v0.2.0

jybp commented 9 months ago

Great! Thanks for the notification!