我正在暴露一个Rest API,当我的API花费超过X秒时,我的消费者希望我抛出超时响应。我认为的一种方法是采取开始时间和结束时间并抛出错误。有效率吗?
I know that below timeout works for the consumers. I need something like this for my API.
<http-conf:conduit name="*.http-conduit">
<http-conf:client ReceiveTimeout="5000"/>
</http-conf:conduit>