You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 have that possibility.
It's usually passed in a specific constructor or within a functional option. func WithHttpClient(client *http.Client) Parameter could be added in parameters.go
I could work toward a PR if maintainers have no bandwidth.
The text was updated successfully, but these errors were encountered:
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 customhttp.RoundTripper
s. It's usually a good practice to have that possibility.https://github.com/attestantio/go-eth2-client/blob/e02b07f2405232b26018a50a25d9fcd9ed75c205/http/service.go/#L97-L110
Example:
https://github.com/google/go-github/blob/3d410c20b3a7e4496f5b86b7d85c0a51dbaf782e/github/github.go#L315-L328
It's usually passed in a specific constructor or within a functional option.
func WithHttpClient(client *http.Client) Parameter
could be added inparameters.go
I could work toward a PR if maintainers have no bandwidth.
The text was updated successfully, but these errors were encountered: