http status code for failed email send

て烟熏妆下的殇ゞ 提交于 2019-12-06 10:08:39

The core of the problem lies in mixing a RESTful resource creation and an RPC-style action. The creation of the user, in a RESTful world, would be the atomic operation and return 201 or 422 (or whatever error code you choose). Then the sending of the confirmation email might be another POST to /api/user/confirmationemailtask that then spins off the email process. When you combine the two you find the areas of ambiguity.

(moved comment to answer for posterity)

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