Permalink
Browse files

added OPTIONS mehod

  • Loading branch information...
1 parent 7ea1764 commit 93b1a48da70aaec53383f7e2c050e0586a819fa3 Alexis Svinartchouk committed with Jun 6, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 mux.go
View
5 mux.go
@@ -157,6 +157,11 @@ func (p *PatternServeMux) Del(pat string, h http.Handler) {
p.Add("DELETE", pat, h)
}
+// Options will register a pattern with a handler for OPTIONS requests.
+func (p *PatternServeMux) Options(pat string, h http.Handler) {
+ p.Add("OPTIONS", pat, h)
+}
+
// Add will register a pattern with a handler for meth requests.
func (p *PatternServeMux) Add(meth, pat string, h http.Handler) {
p.handlers[meth] = append(p.handlers[meth], &patHandler{pat, h})

0 comments on commit 93b1a48

Please sign in to comment.