MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / jsonBody

Function jsonBody

mcp/streamable_client_test.go:150–156  ·  view source on GitHub ↗
(t *testing.T, msg jsonrpc2.Message)

Source from the content-addressed store, hash-verified

148)
149
150func jsonBody(t *testing.T, msg jsonrpc2.Message) string {
151 data, err := jsonrpc2.EncodeMessage(msg)
152 if err != nil {
153 t.Fatalf("encoding failed: %v", err)
154 }
155 return string(data)
156}
157
158func TestStreamableClientTransportLifecycle(t *testing.T) {
159 ctx := context.Background()

Calls 1

EncodeMessageFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…