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

Method RoundTrip

api/client_test.go:426–437  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

424}
425
426func (t redirectFollowingTransport) RoundTrip(req *http.Request) (*http.Response, error) {
427 if len(*t.methods) == 0 {
428 return t.inner.RoundTrip(req)
429 }
430 *t.methods = append(*t.methods, req.Method)
431 return &http.Response{
432 StatusCode: http.StatusNoContent,
433 Header: http.Header{},
434 Body: io.NopCloser(bytes.NewBufferString("")),
435 Request: req,
436 }, nil
437}
438
439func TestUnexpectedStatusError(t *testing.T) {
440 tests := []struct {

Callers

nothing calls this directly

Calls 1

RoundTripMethod · 0.45

Tested by

no test coverage detected