astaxie
|
2629de28f2
|
beego: support more router
//design model
beego.Get(router, beego.FilterFunc)
beego.Post(router, beego.FilterFunc)
beego.Put(router, beego.FilterFunc)
beego.Head(router, beego.FilterFunc)
beego.Options(router, beego.FilterFunc)
beego.Delete(router, beego.FilterFunc)
beego.Handler(router, http.Handler)
//example
beego.Get("/user", func(ctx *context.Context) {
ctx.Output.Body([]byte("Get userlist"))
})
beego.Post("/user", func(ctx *context.Context) {
ctx.Output.Body([]byte("add userlist"))
})
beego.Delete("/user/:id", func(ctx *context.Context) {
ctx.Output.Body([]byte([]byte(ctx.Input.Param(":id")))
})
import (
"http"
"github.com/gorilla/rpc"
"github.com/gorilla/rpc/json"
)
func init() {
s := rpc.NewServer()
s.RegisterCodec(json.NewCodec(), "application/json")
s.RegisterService(new(HelloService), "")
beego.Handler("/rpc", s)
}
|
2014-05-16 10:18:19 +08:00 |
|
astaxie
|
6c6e4ecfbc
|
update all files License
|
2014-04-12 13:18:18 +08:00 |
|
astaxie
|
d57557dc55
|
add AutoRouterWithPrefix
|
2014-01-01 17:57:57 +08:00 |
|
傅小黑
|
ff18ae2562
|
add api comments in file memzipfile.go,reload.go,router.go,template.go and templatefunc.go, fix spelling error GetInitListner as GetInitListener.
|
2013-12-21 13:19:24 +08:00 |
|
傅小黑
|
ce332713c4
|
gofmt commented go files
|
2013-12-20 22:35:16 +08:00 |
|
傅小黑
|
933e98e4f2
|
add api comments in file beego.go
|
2013-12-20 19:36:54 +08:00 |
|
傅小黑
|
3f3bf299a6
|
add api comments in file app.go
|
2013-12-20 19:20:13 +08:00 |
|
vadimi
|
12a37f71be
|
Fixed some typos
|
2013-12-04 22:27:29 -05:00 |
|
astaxie
|
3c91360d72
|
dictinct system pkg and third pkg
|
2013-12-03 21:37:39 +08:00 |
|
Pengfei Xue
|
e823b6ea95
|
add server host:port info when starting app
|
2013-11-26 15:30:59 +08:00 |
|
knightmare
|
47fc32ba47
|
add func InsertFilter(pattern string, pos int, filter FilterFunc) *App to replace AddFilter
pos can be const:
BeforeRouter = iota
AfterStatic
BeforeExec
AfterExec
FinishRouter
|
2013-11-25 15:59:40 +08:00 |
|
astaxie
|
a981dab536
|
fix #286
the process exit and the channel info can't flush to console
|
2013-11-13 21:11:08 +08:00 |
|
astaxie
|
9446563e5b
|
add util func to get the url fix #282
UrlFor(endpoint string, values ...string) string
|
2013-11-10 23:05:07 +08:00 |
|
astaxie
|
63da329468
|
go on modify api
|
2013-09-10 00:17:49 +08:00 |
|
astaxie
|
bd61dd9ffc
|
change a log about new version
|
2013-09-10 00:00:18 +08:00 |
|