【发布时间】:2021-12-11 03:17:25
【问题描述】:
我正在尝试从我用 f3 编写的应用发送帖子。我关注了这个文档https://fatfreeframework.com/3.5/web#POST,但我不知道如何发送 JSON。在 curl 中是 params -d。我的 curl 电话是:
curl -d '{"text":"Hello.","port":[2,3],"param":[{"number":"1","text_param":["Yes"]}]}’ –H "Content-Type:application/json" http://ip.com/api/send -u usr:pass
我如何在 f3 中做到这一点? 非常感谢。
【问题讨论】:
标签: php json post fat-free-framework