File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import (
1212)
1313
1414// FormString returns the first value matching the provided key in the form as a string
15+ // It works the same as http.Request.FormValue:
16+ // try urlencoded request body first, then query string, then multipart form body
1517func (b * Base ) FormString (key string , def ... string ) string {
1618 s := b .Req .FormValue (key )
1719 if s == "" {
@@ -20,7 +22,7 @@ func (b *Base) FormString(key string, def ...string) string {
2022 return s
2123}
2224
23- // FormStrings returns a string slice for the provided key from the form
25+ // FormStrings returns a values for the key in the form (including query parameters), similar to FormString
2426func (b * Base ) FormStrings (key string ) []string {
2527 if b .Req .Form == nil {
2628 if err := b .Req .ParseMultipartForm (32 << 20 ); err != nil {
You can’t perform that action at this time.
0 commit comments