- 08 Jun, 2014 1 commit
-
-
astaxie authored
-
- 06 Jun, 2014 2 commits
-
-
astaxie authored
fixed typo on constant applicationXml
-
Dalto Curvelano Jr authored
-
- 31 May, 2014 3 commits
- 30 May, 2014 1 commit
-
-
Michael authored
-
- 28 May, 2014 1 commit
-
-
astaxie authored
-
- 27 May, 2014 4 commits
- 26 May, 2014 1 commit
-
-
astaxie authored
-
- 25 May, 2014 2 commits
- 23 May, 2014 1 commit
-
-
astaxie authored
-
- 20 May, 2014 10 commits
-
-
astaxie authored
-
astaxie authored
-
astaxie authored
-
astaxie authored
config := tls.Config{ ClientAuth: tls.RequireAndVerifyClientCert, Certificates: []tls.Certificate{cert}, ClientCAs: pool, } config.Rand = rand.Reader beego.BeeApp.Server. TLSConfig = &config
-
astaxie authored
-
astaxie authored
-
astaxie authored
-
astaxie authored
-
astaxie authored
-
astaxie authored
-
- 19 May, 2014 1 commit
-
-
astaxie authored
-
- 16 May, 2014 13 commits
-
-
astaxie authored
-
astaxie authored
-
astaxie authored
-
astaxie authored
-
astaxie authored
ServeFormatted serve Xml OR Json, depending on the value of the Accept header
-
astaxie authored
-
astaxie authored
gob.Register(v)
-
astaxie authored
default value is true when you Enable Global XSRF, also can control in the prepare function to change the value.
-
astaxie authored
ns := beego.NewNamespace("/v1/api/") ns.Cond(func(ctx *context.Context)bool{ if ctx.Input.Domain() == "www.beego.me" { return true } return false }) .Filter("before", Authenticate) .Router("/order", &admin.OrderController{}) .Get("/version",func (ctx *context.Context) { ctx.Output.Body([]byte("1.0.0")) }) .Post("/login",func (ctx *context.Context) { if ctx.Query("username") == "admin" && ctx.Query("username") == "password" { } }) .Namespace( NewNamespace("/shop"). Get("/order/:id", func(ctx *context.Context) { ctx.Output.Body([]byte(ctx.Input.Param(":id"))) }), )
-
slene authored
-
astaxie authored
//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) }
-
astaxie authored
-
jessonchan authored
-