wxgzh
This commit is contained in:
@@ -60,3 +60,6 @@ func Send(text string) error {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,21 +13,21 @@
|
||||
package msg
|
||||
|
||||
import (
|
||||
"github.com/jageros/hawox/httpc"
|
||||
"stock/stock"
|
||||
xml2 "encoding/xml"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func Test_Post(t *testing.T) {
|
||||
url := ""
|
||||
stk, err := stock.NewStocks(600905)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
stk.ForEachStock(func(stk stock.IArg) {
|
||||
arg := stk.Arg("o-KDV6NbRaanYz55fJuSgyR0qxxU")
|
||||
httpc.RequestWithInterface(httpc.POST, url, httpc.JSON, arg, nil)
|
||||
})
|
||||
|
||||
wMsg := &xml{
|
||||
ToUserName: "rMsg.FromUserName",
|
||||
FromUserName: "rMsg.ToUserName",
|
||||
CreateTime: int(time.Now().Unix()),
|
||||
MsgType: "text",
|
||||
Content: "收到,谢谢!",
|
||||
}
|
||||
bty, _ := xml2.Marshal(wMsg)
|
||||
fmt.Println(string(bty))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user