mirror of https://github.com/gin-gonic/gin.git
SetQuery SetForm
This commit is contained in:
parent
4fe5f3e4b4
commit
5a78885058
12
context.go
12
context.go
|
@ -440,6 +440,12 @@ func (c *Context) initQueryCache() {
|
|||
}
|
||||
}
|
||||
|
||||
// SetQuery Modify or add to the cached Query data
|
||||
func (c *Context) SetQuery(key,values string) {
|
||||
c.initQueryCache()
|
||||
c.queryCache.Set(key,values)
|
||||
}
|
||||
|
||||
// GetQueryArray returns a slice of strings for a given query key, plus
|
||||
// a boolean value whether at least one value exists for the given key.
|
||||
func (c *Context) GetQueryArray(key string) ([]string, bool) {
|
||||
|
@ -514,6 +520,12 @@ func (c *Context) initFormCache() {
|
|||
}
|
||||
}
|
||||
|
||||
// SetForm Modify or add to the cached Form data
|
||||
func (c *Context) SetForm(key,values string) {
|
||||
c.initFormCache()
|
||||
c.formCache.Set(key,values)
|
||||
}
|
||||
|
||||
// GetPostFormArray returns a slice of strings for a given form key, plus
|
||||
// a boolean value whether at least one value exists for the given key.
|
||||
func (c *Context) GetPostFormArray(key string) ([]string, bool) {
|
||||
|
|
Loading…
Reference in New Issue