XMLBlob sends an XML blob response with status code.
(code int, b []byte)
| 629 | |
| 630 | // XMLBlob sends an XML blob response with status code. |
| 631 | func (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. |
| 642 | func (c *Context) Blob(code int, contentType string, b []byte) (err error) { |