1
This commit is contained in:
parent
67ec492463
commit
dd01c08cca
@ -33,7 +33,6 @@ type httpCliResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type httpCliMgr struct {
|
type httpCliMgr struct {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *httpCliMgr) init() {
|
func (this *httpCliMgr) init() {
|
||||||
@ -60,6 +59,28 @@ func (this *httpCliMgr) SendGoStyleRequest(
|
|||||||
cb)
|
cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *httpCliMgr) SyncSendGoStyleRequest(
|
||||||
|
url string, params map[string]string,
|
||||||
|
cb func(HttpCliResponse)) {
|
||||||
|
chDone := make(chan bool)
|
||||||
|
this.internalSendRequest(
|
||||||
|
GO_STYLE_REQUEST,
|
||||||
|
NORMAL_CHANNEL,
|
||||||
|
url,
|
||||||
|
params,
|
||||||
|
func(rsp HttpCliResponse) {
|
||||||
|
cb(rsp)
|
||||||
|
chDone <- true
|
||||||
|
})
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case <-chDone:
|
||||||
|
close(chDone)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (this *httpCliMgr) SendJsStyleRequest(
|
func (this *httpCliMgr) SendJsStyleRequest(
|
||||||
url string, params map[string]string,
|
url string, params map[string]string,
|
||||||
cb func(HttpCliResponse)) {
|
cb func(HttpCliResponse)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user