MCPcopy Create free account
hub / github.com/devfeel/dotweb / Write

Method Write

response.go:97–105  ·  view source on GitHub ↗

Write writes the data to the connection as part of an HTTP reply.

(code int, b []byte)

Source from the content-addressed store, hash-verified

95
96// Write writes the data to the connection as part of an HTTP reply.
97func (r *Response) Write(code int, b []byte) (n int, err error) {
98 if !r.committed {
99 r.WriteHeader(code)
100 }
101 n, err = r.writer.Write(b)
102 r.Size += int64(n)
103 r.body = append(r.body, b[0:]...)
104 return
105}
106
107// End stop current response
108func (r *Response) End() {

Callers

nothing calls this directly

Calls 2

WriteHeaderMethod · 0.95
WriteMethod · 0.65

Tested by

no test coverage detected