working commit
This commit is contained in:
@@ -25,6 +25,15 @@ func NewContext(writer http.ResponseWriter, request *http.Request) *Context {
|
||||
return rctx
|
||||
}
|
||||
|
||||
func (rctx *Context) GetSubpath(key string) (string, bool) {
|
||||
value, exists := rctx.PathMap[key]
|
||||
return value, exists
|
||||
}
|
||||
|
||||
func (rctx *Context) GetQuery(key string) string {
|
||||
return rctx.Request.URL.Query().Get(key)
|
||||
}
|
||||
|
||||
func (rctx *Context) SetHeader(key, value string) {
|
||||
rctx.Writer.Header().Set(key, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user