diff --git a/oppai/oppai.go b/oppai/oppai.go index ef60d0c..1b6e9ea 100644 --- a/oppai/oppai.go +++ b/oppai/oppai.go @@ -74,6 +74,10 @@ func (e *RouterGroup) DELETE(pattern string, handler HandlerFunc) { e.AddRoutes("DELETE", pattern, handler) } +func (e *Engine) OPTION(pattern string, handler HandlerFunc) { + e.router.AddRoutes("OPTION", pattern, handler) +} + func (e *Engine) Run(addr string) (err error) { return http.ListenAndServe(addr, e) }