Query returns the keyed url query value if it exists, otherwise it returns an empty string `("")`. It is shortcut for `c.Request.URL.Query().Get(key)` GET /path?id=1234&name=Manu&value= c.Query("id") == "1234" c.Query("name") == "Manu" c.Query("value") == "" c.Query("wtf")
(key string)
| 523 | // c.Query("value") == "" |
| 524 | // c.Query("wtf") == "" |
| 525 | func (c *Context) Query(key string) (value string) { |
| 526 | value, _ = c.GetQuery(key) |
| 527 | return |
| 528 | } |
| 529 | |
| 530 | // DefaultQuery returns the keyed url query value if it exists, |
| 531 | // otherwise it returns the specified defaultValue string. |