MCPcopy Index your code
hub / github.com/labstack/echo / XMLBlob

Method XMLBlob

context.go:631–639  ·  view source on GitHub ↗

XMLBlob sends an XML blob response with status code.

(code int, b []byte)

Source from the content-addressed store, hash-verified

629
630// XMLBlob sends an XML blob response with status code.
631func (c *Context) XMLBlob(code int, b []byte) (err error) {
632 c.writeContentType(MIMEApplicationXMLCharsetUTF8)
633 c.response.WriteHeader(code)
634 if _, err = c.response.Write([]byte(xml.Header)); err != nil {
635 return
636 }
637 _, err = c.response.Write(b)
638 return
639}
640
641// Blob sends a blob response with status code and content type.
642func (c *Context) Blob(code int, contentType string, b []byte) (err error) {

Callers 1

TestContextXMLBlobFunction · 0.95

Calls 3

writeContentTypeMethod · 0.95
WriteHeaderMethod · 0.45
WriteMethod · 0.45

Tested by 1

TestContextXMLBlobFunction · 0.76