MCPcopy Index your code
hub / github.com/google/go-github / RoundTrip

Method RoundTrip

github/github.go:1939–1950  ·  view source on GitHub ↗

RoundTrip implements the RoundTripper interface.

(req *http.Request)

Source from the content-addressed store, hash-verified

1937
1938// RoundTrip implements the RoundTripper interface.
1939func (t *UnauthenticatedRateLimitedTransport) RoundTrip(req *http.Request) (*http.Response, error) {
1940 if t.ClientID == "" {
1941 return nil, errors.New("t.ClientID is empty")
1942 }
1943 if t.ClientSecret == "" {
1944 return nil, errors.New("t.ClientSecret is empty")
1945 }
1946
1947 req2 := setCredentialsAsHeaders(req, t.ClientID, t.ClientSecret)
1948 // Make the HTTP request.
1949 return t.transport().RoundTrip(req2)
1950}
1951
1952// Client returns an *http.Client that makes requests which are subject to the
1953// rate limit of your OAuth application.

Calls 3

transportMethod · 0.95
setCredentialsAsHeadersFunction · 0.85
RoundTripMethod · 0.45