Base on gorequest to test webhook(Provide from Wechat)and send a post requsest
PS. This passage will not provision proxy, you may need a laddar or any other method to get the package.
1. Install gorequest
- We can use
go getcommand to install this package.
$ go get github.com/parnurzeal/gorequest
2. Open a robot of Wechat or DingTalk
- This passage we use Wechat to test webhook.
- We can use phone to add a robot, DingTalk need set in PC platform.
PS. DingTalk now need security verify
- After we can get a url of webhook

- DingTalk need to set fliter or security, any details are in document of DingTalk api.
3. Create a request use Golang
Code:

本文介绍了如何利用Golang中的gorequest包来发送POST请求测试Webhook,特别是在WeChat和DingTalk场景下。首先,需要安装gorequest库,然后在聊天应用中创建机器人获取webhookURL。接着,通过Golang代码示例展示了发送包含文本消息的webhook请求的过程。
最低0.47元/天 解锁文章
4296





