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

Method WriteStringC

context.go:583–586  ·  view source on GitHub ↗

WriteStringC write (httpCode, string, text/plain) to response

(code int, contents ...interface{})

Source from the content-addressed store, hash-verified

581
582// WriteStringC write (httpCode, string, text/plain) to response
583func (ctx *HttpContext) WriteStringC(code int, contents ...interface{}) error {
584 content := fmt.Sprint(contents...)
585 return ctx.WriteBlobC(code, MIMETextPlainCharsetUTF8, []byte(content))
586}
587
588// WriteString write (200, string, text/html) to response
589func (ctx *HttpContext) WriteHtml(contents ...interface{}) error {

Callers 1

WriteStringMethod · 0.95

Calls 1

WriteBlobCMethod · 0.95

Tested by

no test coverage detected