MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / writeTextStatus

Method writeTextStatus

rest/handler.go:1589–1591  ·  view source on GitHub ↗

writeTextStatus writes the given bytes as a plaintext response. If status is nonzero, the header will be written with that status.

(status int, value []byte)

Source from the content-addressed store, hash-verified

1587// writeTextStatus writes the given bytes as a plaintext response.
1588// If status is nonzero, the header will be written with that status.
1589func (h *handler) writeTextStatus(status int, value []byte) {
1590 h.writeWithMimetypeStatus(status, value, "text/plain")
1591}
1592
1593func (h *handler) writeJavascript(js string) {
1594 h.writeWithMimetypeStatus(http.StatusOK, []byte(js), "application/javascript")

Callers 2

handlePingMethod · 0.95
writeTextMethod · 0.95

Calls 1

Tested by

no test coverage detected