http api method 목록 리턴하는 함수 추가
This commit is contained in:
@ -826,6 +826,14 @@ func (hc *HttpApiBroker) AddHandler(receiver HttpApiHandler) {
|
||||
}
|
||||
}
|
||||
|
||||
func (hc *HttpApiBroker) AllMethods() (out []string) {
|
||||
out = make([]string, 0, len(hc.methods))
|
||||
for name := range hc.methods {
|
||||
out = append(out, name)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (hc *HttpApiBroker) CallByHeader(w http.ResponseWriter, r *http.Request) {
|
||||
funcname := r.Header.Get("AS-X-CALL")
|
||||
if len(funcname) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user