Skip to content

Commit

Permalink
feat: add InputArray and InputMap (#265)
Browse files Browse the repository at this point in the history
* feat: add InputArray and InputMap interface

* feat: use string

* feat: use string
  • Loading branch information
devhaozi authored Aug 18, 2023
1 parent 01af07e commit edf7306
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 9 deletions.
118 changes: 109 additions & 9 deletions contracts/http/mocks/Request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions contracts/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ type Request interface {

// Input Retrieve data by order: json, form, query, route
Input(key string, defaultValue ...string) string
InputArray(key string, defaultValue ...[]string) []string
InputMap(key string, defaultValue ...map[string]string) map[string]string
InputInt(key string, defaultValue ...int) int
InputInt64(key string, defaultValue ...int64) int64
InputBool(key string, defaultValue ...bool) bool
Expand Down

0 comments on commit edf7306

Please sign in to comment.