1
This commit is contained in:
parent
8f0700f501
commit
60518a8f3c
@ -91,3 +91,11 @@ func (this *HttpServer) RegisterHandle(c string, a string,
|
|||||||
handleName := c + "$" + a
|
handleName := c + "$" + a
|
||||||
this.handlers[handleName] = handle
|
this.handlers[handleName] = handle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *HttpServer) RegisterRestHandle(pattern string,
|
||||||
|
handle func(*http.ResponseWriter, *http.Request)) {
|
||||||
|
http.HandleFunc(pattern,
|
||||||
|
func (w http.ResponseWriter, r *http.Request) {
|
||||||
|
handle(&w, r)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user