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

Method String

context.go:524–526  ·  view source on GitHub ↗

String sends a string response with status code.

(code int, s string)

Source from the content-addressed store, hash-verified

522
523// String sends a string response with status code.
524func (c *Context) String(code int, s string) (err error) {
525 return c.Blob(code, MIMETextPlainCharsetUTF8, stringToBytes(s))
526}
527
528func (c *Context) jsonPBlob(code int, callback string, i any) (err error) {
529 c.writeContentType(MIMEApplicationJavaScriptCharsetUTF8)

Callers 15

TestCSRF_tokenExtractorsFunction · 0.95
TestCSRFWithConfigFunction · 0.95
TestCSRFFunction · 0.95
TestCSRFSetSameSiteModeFunction · 0.95
TestCSRFConfig_skipperFunction · 0.95
TestSecureFunction · 0.95
TestSecureWithConfigFunction · 0.95

Calls 2

BlobMethod · 0.95
stringToBytesFunction · 0.85

Tested by 15

TestCSRF_tokenExtractorsFunction · 0.76
TestCSRFWithConfigFunction · 0.76
TestCSRFFunction · 0.76
TestCSRFSetSameSiteModeFunction · 0.76
TestCSRFConfig_skipperFunction · 0.76
TestSecureFunction · 0.76
TestSecureWithConfigFunction · 0.76