Versions in this module Expand all Collapse all v4 v4.2.0 Jan 12, 2025 v4.1.0 Jan 12, 2025 Changes in this version + func GetResponseWriter(c *Context) http.ResponseWriter v4.0.0 Jan 12, 2025 Changes in this version + type Context struct + Next NextFunc + Req *Request + func (c *Context) ResHeader() http.Header + func (c *Context) SetCookie(cookie *http.Cookie) + type HandlerFunc func(c *Context) Response + func FromHttpHandleFunc(httpHandleFunc func(http.ResponseWriter, *http.Request)) HandlerFunc + func FromHttpHandler(httpHandler http.Handler) HandlerFunc + func MaxBytesMiddleware(n int64) HandlerFunc + type NextFunc func() Response + type Request struct + func (req *Request) AddCookie(c *http.Cookie) + func (req *Request) Context() context.Context + func (req *Request) Cookie(name string) (*http.Cookie, error) + func (req *Request) Cookies() []*http.Cookie + func (req *Request) FormFile(key string) (multipart.File, *multipart.FileHeader, error) + func (req *Request) FormValue(key string) string + func (req *Request) GetBody() RequestBody + func (req *Request) GetHeader(key string) string + func (req *Request) GetHttpRequest() *http.Request + func (req *Request) GetQuery(key string) string + func (req *Request) GetTimestamp() time.Time + func (req *Request) Host() string + func (req *Request) Method() string + func (req *Request) PathValue(name string) string + func (req *Request) RemoteAddr() string + func (req *Request) RequestURI() string + func (req *Request) RootContext() context.Context + func (req *Request) SetContext(ctx context.Context) + func (req *Request) SetHeader(key string, value string) + type RequestBody struct + func (body RequestBody) Close() error + func (body RequestBody) JsonDecode(v any) error + func (body RequestBody) Read(p []byte) (n int, err error) + type Response interface + Send func(http.ResponseWriter, *Request) + type Router struct + func New() *Router + func (r *Router) CreateServeMux() *http.ServeMux + func (r *Router) Handle(pattern string, handlerFuncs ...HandlerFunc) + func (r *Router) SubRouter(pattern string) *Router + func (r *Router) Use(handlerFuncs ...HandlerFunc) Other modules containing this package github.com/gohf-http/gohf github.com/gohf-http/gohf/v2 github.com/gohf-http/gohf/v3 github.com/gohf-http/gohf/v5 github.com/gohf-http/gohf/v6