mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Added support for the REPORT method (#1332)
This commit is contained in:
parent
530f768a47
commit
610d67f17f
3
echo.go
3
echo.go
@ -170,6 +170,8 @@ const (
|
||||
charsetUTF8 = "charset=UTF-8"
|
||||
// PROPFIND Method can be used on collection and property resources.
|
||||
PROPFIND = "PROPFIND"
|
||||
// REPORT Method can be used to get information about a resource, see rfc 3253
|
||||
REPORT = "REPORT"
|
||||
)
|
||||
|
||||
// Headers
|
||||
@ -251,6 +253,7 @@ var (
|
||||
PROPFIND,
|
||||
http.MethodPut,
|
||||
http.MethodTrace,
|
||||
REPORT,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -33,6 +33,7 @@ type (
|
||||
propfind HandlerFunc
|
||||
put HandlerFunc
|
||||
trace HandlerFunc
|
||||
report HandlerFunc
|
||||
}
|
||||
)
|
||||
|
||||
@ -247,6 +248,8 @@ func (n *node) addHandler(method string, h HandlerFunc) {
|
||||
n.methodHandler.put = h
|
||||
case http.MethodTrace:
|
||||
n.methodHandler.trace = h
|
||||
case REPORT:
|
||||
n.methodHandler.report = h
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,6 +275,8 @@ func (n *node) findHandler(method string) HandlerFunc {
|
||||
return n.methodHandler.put
|
||||
case http.MethodTrace:
|
||||
return n.methodHandler.trace
|
||||
case REPORT:
|
||||
return n.methodHandler.report
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user