1 Star 0 Fork 0

liuliang/jpush-api-golang-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
report.go 734 Bytes
一键复制 编辑 原始数据 按行查看 历史
liuliang 提交于 2022-11-09 13:44 +08:00 . init
package jpush
import "time"
// GetReport 获取消息推送结果
func (j *JPushClient) GetReport(msg_ids string) (string, error) {
return j.sendGetReportRequest(msg_ids)
}
// SendGetReportRequest sends a get report request and returns the response body as string
func (j *JPushClient) sendGetReportRequest(msg_ids string) (string, error) {
req := Get(HOST_REPORT)
req.SetTimeout(DEFAULT_CONNECT_TIMEOUT*time.Second, DEFAULT_READ_WRITE_TIMEOUT*time.Second)
req.SetHeader("Connection", "Keep-Alive")
req.SetHeader("Charset", CHARSET)
req.SetBasicAuth(j.AppKey, j.MasterSecret)
req.SetHeader("Content-Type", CONTENT_TYPE_JSON)
req.SetProtocolVersion("HTTP/1.1")
req.SetQueryParam("msg_ids", msg_ids)
return req.String()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dashiqiao/jpush-api-golang-client.git
git@gitee.com:dashiqiao/jpush-api-golang-client.git
dashiqiao
jpush-api-golang-client
jpush-api-golang-client
v1.0.1

搜索帮助