如何使用带有 XML-Body 的 RIE 容器而不是 JSON?
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" "http://localhost:9000/2015-03-31/functions/function/invocations" --data-binary @my.xml
给出一个错误:
{"errorType":"SyntaxError","errorMessage":"Unexpected end of JSON input","trace":["SyntaxError: Unexpected end of JSON input"," at JSON.parse (<anonymous>)"," at Runtime.handleOnce (/var/runtime/Runtime.js:67:14)"]}
对于 JSON,这可以正常工作,但对于 XML 则不行。