Skip to content

Instantly share code, notes, and snippets.

@nguyendangminh
Last active August 29, 2015 12:04
Show Gist options
  • Save nguyendangminh/4515246623a2f5748df3 to your computer and use it in GitHub Desktop.
Save nguyendangminh/4515246623a2f5748df3 to your computer and use it in GitHub Desktop.
Beego cookbook
# Get request parameters
## GET paramaters
### GET example.com/item?id=1203&name=minhnd
### or POST example.com/item (data: id=1203, name=minhnd)
id := c.GetInt("id")
name := c.GetString("name")
### Other methods
### c.GetString(key string) string
### c.GetStrings(key string) []string
### c.GetInt(key string) (int64, error)
### c.GetBool(key string) (bool, error)
### c.GetFloat(key string) (float64, error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment