ColdFusion 10 REST API: How to set status code 201 without RestSetResponse()

浪尽此生 提交于 2019-12-05 07:50:46

I can't see a good reason why restSetResponse() should require a returntype of void, but have verified it is ignored if this is not the case. Which is a bit rubbish.

The only thing I can think by way of working around your situation is to roll-your-own struct with the error detail in it, then use that as the content value set for the restSetResponse() call.

This is a bit jerry-built, but you're constrainted by the jerry-built-ness of ColdFusion in this instance, I think.

I've logged a bug relating to this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!