MCPcopy
hub / github.com/pocketbase/pocketbase / Stream

Method Stream

tools/router/event.go:219–224  ·  view source on GitHub ↗

Stream streams the specified reader into the response.

(status int, contentType string, reader io.Reader)

Source from the content-addressed store, hash-verified

217
218// Stream streams the specified reader into the response.
219func (e *Event) Stream(status int, contentType string, reader io.Reader) error {
220 e.Response.Header().Set(headerContentType, contentType)
221 e.Response.WriteHeader(status)
222 _, err := io.Copy(e.Response, reader)
223 return err
224}
225
226// Blob writes a blob (bytes slice) response.
227func (e *Event) Blob(status int, contentType string, b []byte) error {

Callers 2

TestEventStreamFunction · 0.80
bindUIExtensionsFunction · 0.80

Calls 3

SetMethod · 0.65
CopyMethod · 0.65
WriteHeaderMethod · 0.45

Tested by 1

TestEventStreamFunction · 0.64