Azure Function App - PHP & XML 输出
Azure Function App - PHP & XML Output
在此 post https://github.com/Azure/azure-webjobs-sdk-script/issues/942 中描述的一个非常相似的问题 - 当推送包含 XML 内容的输出时,Azure 似乎将内容包装在序列化标签中。有效地将 XML 嵌套在自己的
中
似乎有一种方法可以设置 headers 并为 NodeJS 中的输出提供额外的上下文。您可以将值定义为 XML,从而确保内容不被换行。
有人对 PHP 有类似的解决方案吗?我试过定义 Headers/Content 类型但没有成功。
提前致谢!
T
正如 Mamaso 所说,这是一个已知问题:php azure function can't set content type #1554。
This is a known issue - the isRaw
flag only applies to node at present. It can only be set in script languages if you serialize to a json string, which turns any bytes into base64 strings (defeating the purpose of isRaw). I'll have a think on how to indicate a raw response from script languages.
Unfortunately there is not a workaround, unless if you can use C#, F#, or node.
在此 post https://github.com/Azure/azure-webjobs-sdk-script/issues/942 中描述的一个非常相似的问题 - 当推送包含 XML 内容的输出时,Azure 似乎将内容包装在序列化标签中。有效地将 XML 嵌套在自己的
中似乎有一种方法可以设置 headers 并为 NodeJS 中的输出提供额外的上下文。您可以将值定义为 XML,从而确保内容不被换行。
有人对 PHP 有类似的解决方案吗?我试过定义 Headers/Content 类型但没有成功。
提前致谢!
T
正如 Mamaso 所说,这是一个已知问题:php azure function can't set content type #1554。
This is a known issue - the
isRaw
flag only applies to node at present. It can only be set in script languages if you serialize to a json string, which turns any bytes into base64 strings (defeating the purpose of isRaw). I'll have a think on how to indicate a raw response from script languages.Unfortunately there is not a workaround, unless if you can use C#, F#, or node.