http api method 목록 리턴하는 함수 추가

This commit is contained in:
2024-07-21 22:24:58 +09:00
parent 17d31f35f3
commit 8cda1aa4c7
2 changed files with 8 additions and 216 deletions

View File

@ -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 {