diff --git a/src/core/api/robot.go b/src/core/api/robot.go index d098c4059..651edb9a6 100644 --- a/src/core/api/robot.go +++ b/src/core/api/robot.go @@ -155,6 +155,10 @@ func (r *RobotAPI) Post() { Name: robot.Name, Token: rawTk, } + + w := r.Ctx.ResponseWriter + w.Header().Set("Content-Type", "application/json") + r.Redirect(http.StatusCreated, strconv.FormatInt(id, 10)) r.Data["json"] = robotRep r.ServeJSON()