MCPcopy Create free account
hub / github.com/53AI/53AIHub / Write

Method Write

api/controller/response_handler.go:138–143  ·  view source on GitHub ↗

Write 实现 ResponseWriter 接口

(b []byte)

Source from the content-addressed store, hash-verified

136
137// Write 实现 ResponseWriter 接口
138func (w *StreamResponseInterceptor) Write(b []byte) (int, error) {
139 // 收集响应内容
140 w.collector.Collect(b)
141 // 同时转发给客户端
142 return w.ResponseWriter.Write(b)
143}
144
145// WriteHeader 实现 ResponseWriter 接口
146func (w *StreamResponseInterceptor) WriteHeader(statusCode int) {

Callers

nothing calls this directly

Calls 1

CollectMethod · 0.45

Tested by

no test coverage detected