- 好友
- 5
- 在线时间
- 3 小时
- 最后登录
- 2025-9-3
见习骑士

- UID
- 3181770
- 第纳尔
- 1906
- 精华
- 0
- 互助
- 15
- 荣誉
- 0
- 贡献
- 10
- 魅力
- 170
- 注册时间
- 2020-5-5
 鲜花( 44)  鸡蛋( 0)
|
本帖最后由 zz010606 于 2025-6-5 19:40 编辑
该贴主要针对WSE2作者开发的"send_post_message_to_url_advanced"展示接口调用示例
调用方式为:
- (send_post_message_to_url_advanced,"@http://www.xxxx.com/testApi",s0,"@Id=2","script_network_test_success", "script_network_fail", 0),
复制代码
上述代码标识针对某个域名发送一个post请求,
我们需要准备3个信息
1域名(纯ip也可以,但似乎不能带端口)
2user_agent_string
3请求体信息,格式为 xxx=xxx,若需要传输多个参数,则为xxx=xxx&xxx=xxx,例:account=admin&password=12345
我的示例请求里:
s0存放的是:user_agent_string (一般在这里面存放token)[token是什么?可以百度一下]
请求体里存放的是:Id ,其值为2
若请求调用成功,则调用我们自己定义的script来接收处理返回值:- script_network_test_success
复制代码
若调用失败,会调用
然后你需要准备一个云服务器,能够给你的请求接收然后返回信息内容。
返回值类型是:
"xxx|xxx|xxx|xxx" xxx可以为数字或者字符串
调用成功后代码讲解:
- ("script_network_test_success", [
- # (store_script_param, ":num_integers", 1),num_integers是云端传输过来数字的数量
- # (store_script_param, ":num_strings", 2),num_strings是云端传输过来字符串数量
- # 假设云端传输过来的是"1|hello world|2|3"则reg0=1 reg1=2 reg2=3 s0="hello world" script会自动识别数字与字符串并且赋予给reg与字符串寄存器
- ]),
复制代码
|
|