Skip to content

How to parse query params in GO Serverless function

David A. Viramontes edited this page Mar 19, 2019 · 2 revisions
q, err := url.ParseQuery(req.Body)
if err != nil {
	return Response{StatusCode: 400, Headers: headers}, errors.Wrap(err, "Bad input")
}

from := q.Get("From")
body := q.Get("Body")
to := q.Get("To")

see this for full working example

Clone this wiki locally