lua - 试图将 https 字符串发送到 lua 中的网站
问题描述
我对 lua 有点陌生,我有需要调用的 API。
"https://status.abc.com/integrations/plus/?endpoint="..number.."&server="..server
这不是 json 格式。它只是将此 http 字符串发送到 Web 服务器。完成此任务的最简单方法是什么?
解决方案
local ok =os.execute([[curl --cert /etc/openvpn/cert.crt --key /etc/openvpn/key.key -X POST -H 'Content-Type: application/x-www-form- urlencoded' 'url here' --data 'data here']])
推荐阅读
- javascript - 无法将数据传递给 chart.js 图表
- opencv - 使用 Yocto 的 OpenCV 4.4.0 构建错误
- pytorch - PyTorch:在哪些情况下 register_hook 可以返回无梯度?
- sql - 在 SQL WHERE 子句中将值与自身进行比较是否会失败
- python-3.x - 是否可以对 python 字符串进行惰性格式化?
- discord.py - Discord.py 命令前缀不调用命令?
- r - R 新手。我有一组来自 Stata 的代码,我想在 R 中重现
- javascript - 如何将 JSON 数组存储到本地存储
- ipa - iOS 14 - 无法加载 ipa(Apple Developer Enterprise Program)
- windows - 自签名 SSL 证书适用于 IE 和 curl,但不适用于现代浏览器