1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

Update to 8.3.3 | Even better MVC. Read HISTORY.md

Former-commit-id: 88998c317117abff1a214cf396b205d8d8ea888c
This commit is contained in:
kataras
2017-08-23 01:11:52 +03:00
parent e12513a534
commit 1ffe4479f7
13 changed files with 380 additions and 194 deletions

View File

@@ -77,11 +77,15 @@ type HelloController struct {
mvc.Controller
}
type myJSONData struct {
Message string `json:"message"`
}
// Get serves
// Method: GET
// Resource: http://localhost:8080/hello
func (c *HelloController) Get() {
c.Ctx.JSON(iris.Map{"message": "Hello iris web framework."})
c.Ctx.JSON(myJSONData{"Hello iris web framework."})
}
/* Can use more than one, the factory will make sure