Is your feature request related to a problem? Please describe.
Typically the default implementation of Transport http.DefaultTransport does not accept self signed certificates. In some environments PKIs are used with Root- or Intermediate-CAs not signed by an official CA. Therefore it might be necessary to customize the transport used by a client.
With the current implementation this is not possible as the custom implemented RoundTrip always calls http.DefaultTransport.RoundTrip().
Describe the solution you'd like
It should be possibile to define the wrapping Transport of the custom transport in client.go. An usage could look like this:
I would recommend to use a pointer instead of the struct value to guarantee a shared/synced transport between Client.session.Transport and Client.clientTransport
a. Client.clientTransport is stuttering. Could it not be Client.transport or exposed Client.Transport?
Add a "base" Parent to transport
a. basic http.RoundTripper that will be called in RoundTrip instead of http.DefaultTransport.RoundTrip()
b. Initialize transport.Parent with http.DefaultTransport to keep old behavior.
Feature request
Is your feature request related to a problem? Please describe.
Typically the default implementation of Transport
http.DefaultTransport
does not accept self signed certificates. In some environments PKIs are used with Root- or Intermediate-CAs not signed by an official CA. Therefore it might be necessary to customize the transport used by a client.With the current implementation this is not possible as the custom implemented
RoundTrip
always callshttp.DefaultTransport.RoundTrip()
.Describe the solution you'd like
It should be possibile to define the wrapping
Transport
of the custom transport inclient.go
. An usage could look like this:Few things need to be changed for this:
Client.clientTransport
needs to be exposedtransport
betweenClient.session.Transport
andClient.clientTransport
a.Client.clientTransport
is stuttering. Could it not beClient.transport
or exposedClient.Transport
?Parent
totransport
a. basichttp.RoundTripper
that will be called inRoundTrip
instead ofhttp.DefaultTransport.RoundTrip()
b. Initializetransport.Parent
withhttp.DefaultTransport
to keep old behavior.A pull request will be created after this issue.