serve: rcell: get message header from path
This commit is contained in:
parent
cbe209643c
commit
7c3c88cfc2
1 changed files with 3 additions and 4 deletions
|
@ -29,9 +29,6 @@ func Serve(ctx lib.Context) {
|
|||
r := gin.New()
|
||||
r.Use(gin.Recovery())
|
||||
r.Use(Logger(ctx))
|
||||
/*r.GET("/*action", func(c *gin.Context) {
|
||||
c.String(http.StatusOK, "Hello World")
|
||||
})*/
|
||||
cfg := ctx.Config().(*Cfg)
|
||||
for _, rcfg := range cfg.routes {
|
||||
setRoute(ctx, rcfg, r)
|
||||
|
@ -62,5 +59,7 @@ func setRoute(ctx lib.Context, rcfg routeCfg, r *gin.Engine) {
|
|||
// RCell (request / response handler cell) implementation
|
||||
|
||||
func RCell(ctx lib.Context, spec *rcellSpec, gc *gin.Context) {
|
||||
fmt.Println("*** RCell called")
|
||||
msg := gc.Param("msg")
|
||||
fmt.Printf("*** RCell called: msg: %s\n", msg)
|
||||
gc.String(http.StatusOK, "Hello World")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue