MCPcopy Create free account
hub / github.com/buggregator/server / truncateBody

Function truncateBody

modules/proxy/payload.go:88–93  ·  view source on GitHub ↗

truncateBody caps body at maxBodySize and marks it as truncated.

(body []byte)

Source from the content-addressed store, hash-verified

86
87// truncateBody caps body at maxBodySize and marks it as truncated.
88func truncateBody(body []byte) string {
89 if len(body) <= maxBodySize {
90 return string(body)
91 }
92 return string(body[:maxBodySize]) + "\n[truncated]"
93}

Callers 1

buildHTTPDumpEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected