admin管理员组文章数量:1355628
I have a rest call in PL/SQL that create a record in the database and that returns a response with the whole record back. This works fine.
But now I want to return a warning message when a certain record already exists, it isn't an error and it can be that the record can be valid like this. But it is just a warning to inform the end-user of this fact.
I read about using HTML code 199 for this. But I want to know how exactly I should deliver the message in the output from PL/SQL code. Can someone give an example of this?
I have a rest call in PL/SQL that create a record in the database and that returns a response with the whole record back. This works fine.
But now I want to return a warning message when a certain record already exists, it isn't an error and it can be that the record can be valid like this. But it is just a warning to inform the end-user of this fact.
I read about using HTML code 199 for this. But I want to know how exactly I should deliver the message in the output from PL/SQL code. Can someone give an example of this?
Share Improve this question edited Mar 28 at 14:58 jonrsharpe 122k30 gold badges268 silver badges475 bronze badges asked Mar 28 at 14:55 nightfox79nightfox79 2,1393 gold badges30 silver badges44 bronze badges1 Answer
Reset to default 0According to Wikipedia HTTP status code 199 is obsolete, so you should not use it.
Could you not just send back a 200 (OK) status and add a "warnings" node to the response, so that the caller can act on the warnings if it wants to, or ignore them?
本文标签: restHow to send a warning in a PLSQL successful responseStack Overflow
版权声明:本文标题:rest - How to send a warning in a PLSQL successful response? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744030151a2578754.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论