Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(initFns ...OptionFn) http.RoundTripper
Types ¶
type OptionFn ¶
func WithProxyURL ¶
func WithTransport ¶
func WithTransport(tr http.RoundTripper) OptionFn
type Transport ¶
type Transport struct {
Base http.RoundTripper
ProxyURL vocab.IRI
}
func (Transport) RoundTrip ¶
RoundTrip only accepts HTTP GET requests to a remote server. If a 403 (or 401, for Mastodon servers with secure fetch) error is returned by the Base round-tripper, and we have a valid ProxyURL value, we try to request the original HTTP GET URL through the proxying mechanism provided by the server owning the proxy URL. If the server requires authorization, that should be handled by the Base transport - using most likely the OAuth2 round tripper.
Click to show internal directories.
Click to hide internal directories.