如何在 cfhttp 中指定自定义 mime 类型?
我正在使用 API,XML mime 类型需要是 application/atom+xml。 ColdFusion 使用的 XML 类型不是我需要的类型,因此我正在使用的 API 返回一个错误。有没有人可以设置自定义 mime 类型?我不想每次都必须创建一个临时文件并在那里设置类型。
I am working with an API and the XML mime type needs to be application/atom+xml. The XML type that ColdFusion uses is not the one I need and the API I am working with is giving back an error because of it. Is there anyone to set a custom mime type? I do not want to have to go the route of making a temporary file every time and setting the type on there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
假设您尝试从 ColdFusion 提供 XML,请使用 cfcontent 标记 这样:
“reset”属性告诉 ColdFusion 取消之前为输出缓冲的任何内容。
Assuming you're trying to serve the XML from ColdFusion use the cfcontent tag as such:
The "reset" attribute tells ColdFusion to cancel out anything buffered for output previously.