MCPcopy Create free account
hub / github.com/cli/cli / RoundTrip

Method RoundTrip

pkg/cmd/agent-task/capi/client_test.go:17–20  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

15}
16
17func (r *recordingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
18 r.authHeaders = append(r.authHeaders, req.Header.Get("Authorization"))
19 return &http.Response{StatusCode: http.StatusOK, Body: http.NoBody, Header: make(http.Header), Request: req}, nil
20}
21
22// sequencedAuthConfig returns a different credential on each call and records the hostname it was asked about, so a
23// test can prove the transport resolves a token per request rather than once at construction time.

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected