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

Method RoundTrip

pkg/cmd/issue/edit/edit_test.go:1815–1827  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

1813}
1814
1815func (g *graphQLRecorder) RoundTrip(req *http.Request) (*http.Response, error) {
1816 if req.Body != nil && strings.HasSuffix(req.URL.Path, "/graphql") {
1817 body, err := io.ReadAll(req.Body)
1818 if err != nil {
1819 return nil, err
1820 }
1821 req.Body = io.NopCloser(bytes.NewReader(body))
1822 g.mu.Lock()
1823 g.queries = append(g.queries, string(body))
1824 g.mu.Unlock()
1825 }
1826 return g.inner.RoundTrip(req)
1827}
1828
1829// recorded returns every query seen so far, joined for substring matching.
1830func (g *graphQLRecorder) recorded() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected