This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.11.11.2.3. 正文(body)
返回请求正文(如果有)。如果请求正文包含 JSON 代码,这将会进行解析,以便属性可以直接可用。
body 示例
您可以使用 kn func invoke 命令访问功能:
示例命令
kn func invoke --target 'http://example.function.com' --data '{"hello": "world"}'
$ kn func invoke --target 'http://example.function.com' --data '{"hello": "world"}'
输出示例
{"level":30,"time":1604511655265,"pid":3430203,"hostname":"localhost.localdomain","reqId":1,"msg":"world"}
{"level":30,"time":1604511655265,"pid":3430203,"hostname":"localhost.localdomain","reqId":1,"msg":"world"}