MCPcopy Create free account
hub / github.com/devfeel/dotweb / DefaultMethodNotAllowedHandler

Function DefaultMethodNotAllowedHandler

dotweb.go:700–703  ·  view source on GitHub ↗

DefaultMethodNotAllowedHandler default exception handler

(ctx Context)

Source from the content-addressed store, hash-verified

698
699// DefaultMethodNotAllowedHandler default exception handler
700func DefaultMethodNotAllowedHandler(ctx Context) {
701 ctx.Response().Header().Set(HeaderContentType, CharsetUTF8)
702 ctx.WriteStringC(http.StatusMethodNotAllowed, http.StatusText(http.StatusMethodNotAllowed))
703}
704
705// DefaultAutoOPTIONSHandler default handler for options request
706// if set HttpServer.EnabledAutoOPTIONS, auto bind this handler

Callers

nothing calls this directly

Calls 4

SetMethod · 0.65
ResponseMethod · 0.65
WriteStringCMethod · 0.65
HeaderMethod · 0.45

Tested by

no test coverage detected