Replies: 1 comment 1 reply
|
Would requests.DoerTransport work for your use case? TBH, I'm still not sure if end users are supposed to be customizing Clients/Doers or Transports/RoundTrippers: golang/go#59266. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am working on an ActivityPub library that has as a component a custom client that extends a default
http.Clientfunctionality with custom behaviour specific to ActivityPub.I want to use this
requestsmodule for streamlining some of the request building and dispatching, as its fluent API would match pretty well with what I've been doing already.One point where I stumbled is that I can't pass an instance of my custom client struct to the
Client()method of the builder because it specifically expects a*http.Client.I would be interested if this requirement can be relaxed to an
interface { Do(*http.Request) (*http.Response, error) }as that seems to be the only call being made to it - unless I've missed something deeper in the module.Also thank you for maintaining this @earthboundkid. I'm sad I've only recently stumbled upon it, as it could have saved me some headaches along the way. :)
All reactions