MCPcopy
hub / github.com/labstack/echo / Stream

Method Stream

context.go:650–655  ·  view source on GitHub ↗

Stream sends a streaming response with status code and content type.

(code int, contentType string, r io.Reader)

Source from the content-addressed store, hash-verified

648
649// Stream sends a streaming response with status code and content type.
650func (c *Context) Stream(code int, contentType string, r io.Reader) (err error) {
651 c.writeContentType(contentType)
652 c.response.WriteHeader(code)
653 _, err = io.Copy(c.response, r)
654 return
655}
656
657// File sends a response with the content of the file.
658//

Callers 1

TestContextStreamFunction · 0.95

Calls 2

writeContentTypeMethod · 0.95
WriteHeaderMethod · 0.45

Tested by 1

TestContextStreamFunction · 0.76