mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
将反向HTTP POST服务中请求的Method由GET修改为POST (#1794)
This commit is contained in:
parent
0e08ceccdd
commit
8343db5ae3
@ -356,7 +356,7 @@ func (c *HTTPClient) onBotPushEvent(e *coolq.Event) {
|
||||
for i := uint64(0); i <= c.MaxRetries; i++ {
|
||||
// see https://stackoverflow.com/questions/31337891/net-http-http-contentlength-222-with-body-length-0
|
||||
// we should create a new request for every single post trial
|
||||
req, err = http.NewRequest(http.MethodGet, c.addr, bytes.NewReader(e.JSONBytes()))
|
||||
req, err = http.NewRequest(http.MethodPost, c.addr, bytes.NewReader(e.JSONBytes()))
|
||||
if err != nil {
|
||||
log.Warnf("上报 Event 数据到 %v 时创建请求失败: %v", c.addr, err)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user