From ba0bb125c9f51edb81bf1e25c2d725e97fa77c2a Mon Sep 17 00:00:00 2001 From: Craig Jellick Date: Wed, 14 Mar 2018 18:57:57 -0700 Subject: [PATCH] Use request.PostForm instead of request.Form when PostForm will ignore URL query parameters and will only look at the body. This is much more useful for actions, which have a query param that is the action name, but the a json body. WIthout this change, the only "field" found when parsing an action body is the name of the action. --- parse/parse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse/parse.go b/parse/parse.go index 8525f89a..b8720f28 100644 --- a/parse/parse.go +++ b/parse/parse.go @@ -281,7 +281,7 @@ func Body(req *http.Request) (map[string]interface{}, error) { return valuesToBody(req.MultipartForm.Value), nil } - if req.Form != nil && len(req.Form) > 0 { + if req.PostForm != nil && len(req.PostForm) > 0 { return valuesToBody(map[string][]string(req.Form)), nil }