1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-17 01:43:02 +02:00

v2 is compiling now

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-01-28 23:46:11 -08:00
parent dbd1e8e230
commit 688293b5ed
37 changed files with 832 additions and 1212 deletions

View File

@ -135,18 +135,12 @@ func (c *context) Param(name string) (value string) {
// Query returns query parameter by name.
func (c *context) Query(name string) string {
if c.query == nil {
// TODO: v2
// c.query = c.request.URL.Query()
}
return c.query.Get(name)
return c.request.URL().QueryValue(name)
}
// Form returns form parameter by name.
func (c *context) Form(name string) string {
// TODO: v2
// return c.request.FormValue(name)
return ""
return c.request.FormValue(name)
}
// Get retrieves data from the context.