Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 873 Bytes

README.md

File metadata and controls

39 lines (29 loc) · 873 Bytes

web.Context

hoisie web.go's Context for Martini.

API Reference

Description

web.Context provides a web.go compitable layer for reusing the code written with hoisie's web.go framework. Here compitable means we can use web.Context the same way as in hoisie's web.go but not the others.

Usage

package main

import (
   "github.com/codegangsta/martini"
   "github.com/codegangsta/martini-contrib/web"
 )

func main() {
  m := martini.Classic()
  m.Use(web.ContextWithCookieSecret(""))

  m.Post("/hello", func(ctx *web.Context){
  	  ctx.WriteString("Hello World!")
  })

  m.Run()
}

Authors