go - How to get the POST params in revel golang -
how can parameters on post request in revel?? have this:
func (c app) ndc() revel.result { fmt.println(c.params) //more simple code return json... }
i have tested many things nothing works, prefer let code cleaner possible. output:
&{map[origin:[lhr] destination:[dme] departuredate:[2016-10-31] arrivaldate:[]] map[] map[] map[] map[origin:[lhr] destination:[dme] departuredate:[2016-10-31] arrivaldate:[]] map[] []}
the content good, but... how can 1 one these variables , values??
thank you.
it's simple map , values in slice. origin
value request:
c.params["origin"][0]
edit: above not work, should:
c.params.get("origin")
Comments
Post a Comment