Versions in this module Expand all Collapse all v1 v1.0.0 Mar 24, 2022 Changes in this version + const CacheControlHeader + const CacheControlNoCache + const ContentLengthHeader + const ContentTypeHeader + const ContentTypeOptionHeader + const EtagHeader + const ExpiresHeader + const ExpiresNone + const ForwardedForIPHeader + const FrameOptionHeader + const IfModifiedSince + const IfNoneMatch + const LastModifiedHeader + const LocationHeader + const RetryAfterHeader + const Server + const UserAgentHeader + const VaryHeader + const XCsrfToken + const XForwardedProto + const XssProtectionHeader + var ContentTypeOptionNoSniffing = []string + var FrameOptionDeny = []string + var FrameOptionSameOrigin = []string + var HtmlContentType = []string + var HtmlContentUTF8Type = []string + var JsonContentType = []string + var JsonContentUTF8Type = []string + var MethodGET = []byte("GET") + var MethodHEAD = []byte("HEAD") + var MethodPOST = []byte("POST") + var TextContentType = []string + var TextContentUTF8Type = []string + var UrlencodeContentType = []string + var UrlencodeContentUTF8Type = []string + var XssProtectionBlocking = []string + func DumpJSONFasthttp(ctx *fasthttp.RequestCtx, code int, serializable any) + func GetCookieValue(req *http.Request, name string) (cookieValue string) + func HasContentTypeFasthttp(r *fasthttp.Request, mimetype string) bool + func SetCookieValue(key string, expireDuration time.Duration, sessionSecure bool) func(http.ResponseWriter, string, string) + type CookieWriterFasthttp func(*fasthttp.Response, []byte, string) + func NewCookieWriter(key string, expireDuration time.Duration, secured bool) CookieWriterFasthttp + type HandledError int + const HandledErrorBadGateway + const HandledErrorBadRequest + const HandledErrorForbidden + const HandledErrorGatewayTimeout + const HandledErrorGone + const HandledErrorInternalServerError + const HandledErrorMethodNotAllowed + const HandledErrorNotAcceptable + const HandledErrorNotFound + const HandledErrorNotImplemented + const HandledErrorRequestTimeout + const HandledErrorServiceUnavailable + const HandledErrorTooManyRequests + const HandledErrorUnauthorized + func HandledErrorCodeOf(value int) (HandledError, bool) + func HandledErrorOf(value any) (HandledError, bool) + func WrapHandledError(panicObj any) (handler HandledError, err error) + func (handler HandledError) Error() string + func (handler HandledError) RenderAPI(ctx *fasthttp.RequestCtx, _ error) + func (handler HandledError) RenderPage(ctx *fasthttp.RequestCtx, templateRenderer PageRenderer, err error) + func (handler HandledError) StatusCode() int + func (handler HandledError) StatusDescription() (msg string) + func (handler HandledError) StatusMessage() (msg string) + type PageRenderer = func(r *fasthttp.RequestCtx, name string, context map[string]any) error