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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user