Last active
August 29, 2015 12:04
-
-
Save nguyendangminh/4515246623a2f5748df3 to your computer and use it in GitHub Desktop.
Beego cookbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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