fix x-www-form-urlencoded requests

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-04-03 11:55:22 +03:00
parent e358db44ca
commit 9150958044
4 changed files with 22 additions and 11 deletions

View File

@@ -87,6 +87,10 @@ func newPathRequest(path string, method string, body string, msg interface{}, ta
t.name = strings.ToLower(fld.Name)
}
if !val.IsValid() || val.IsZero() {
continue
}
if _, ok := fieldsmap[t.name]; ok {
fieldsmap[t.name] = fmt.Sprintf("%v", val.Interface())
} else if (body == "*" || body == t.name) && method != http.MethodGet {