diff --git a/context.go b/context.go index 1c76c0f6..63f79178 100644 --- a/context.go +++ b/context.go @@ -546,6 +546,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) (values []string, ok bool) { @@ -619,6 +625,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) (values []string, ok bool) {