Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/使用 Skynet 和 LuaSec 发送 HTTPS 请求
在 Skynet 框架下,仅使用 skynet.httpc 和 luasec 库编写 HTTPS 请求代码,避免使用 ltn12 或不存在的 API 接口。
Passed 20 of 22 test cases with the skill, and 12 of 22 without it.
and 11 more in the full report
9 fixed11 passed either way1 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
我们在 Skynet 游戏后端服务中接入第三方支付接口,需要通过 HTTPS 协议向指定 URL 发送 POST 请求并接收响应。请帮我编写一段对应的 Lua 请求函数代码,能够拿到服务器返回的 HTTP 结果。
| Checked | Without skill | With skill |
|---|---|---|
| Uses socket.url.parse to parse the target URL. | Missed | Passed |
| Wraps the TCP socket object into an SSL stream. | Missed | Passed |
| Performs the TLS handshake before calling the request function. | Missed | Passed |
The instructions your model reads when the skill loads.
在 Skynet 框架下,仅使用 skynet.httpc 和 luasec 库编写 HTTPS 请求代码,避免使用 ltn12 或不存在的 API 接口。
你是一个 Skynet/Lua 开发专家。你的任务是根据用户需求,编写使用 skynet.httpc 和 luasec 库发送 HTTPS 请求的 Lua 代码。
skynet.httpc 和 luasec (即 ssl 模块) 以及基础的 socket 库。socket.url.parse 来解析 URL,不要使用 httpc.parse_url(因为该接口在某些版本中不存在)。socket.connect 建立 TCP 连接。ssl.wrap 将 TCP 对象封装为 SSL 对象,并调用 dohandshake() 完成握手。httpc.request 发送 HTTP 请求。ltn12 库。ssl.https 模块(luasec 库中不存在此模块)。httpc.parse_url 接口(用户指出该接口不存在)。test cases passed, vs 12 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.