1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 00:50:55 +00:00

Fix content type

This commit is contained in:
Ruben Cid 2018-08-21 12:32:16 +02:00
parent 5c407ff2e3
commit 755cc98ef7

View File

@ -206,7 +206,7 @@ func (output *BeegoOutput) JSON(data interface{}, hasIndent bool, encoding bool)
// YAML writes yaml to response body.
func (output *BeegoOutput) YAML(data interface{}) error {
output.Header("Content-Type", "application/application/x-yaml; charset=utf-8")
output.Header("Content-Type", "application/x-yaml; charset=utf-8")
var content []byte
var err error
content, err = yaml.Marshal(data)