简体   繁体   English

如何在Twilio中指定传出的HTTP呼叫超时

[英]How to specify outgoing http call timeout in Twilio

I'm using TwilioRestClient from .NET Twilio.API 3.4.1.0. 我使用TwilioRestClient从.NET Twilio.API 3.4.1.0。 I need to specify timeout when calling to SendSmsMessage() but it looks like there is no suitable overload. 调用SendSmsMessage()时,我需要指定超时,但是看起来没有合适的重载。 How can I do that? 我怎样才能做到这一点?

Twilio evangelist here. Twilio的传播者在这里。

Just to be clear, you want to specify the HTTP timeout? 为了清楚起见,您要指定HTTP超时时间吗? I don't think you can do this via the library so it its something you absolutely need, you will probably have to just make the API request via RestSharp or HttpWebRequest (or HttpClient of you are using .NET 4 or newer). 我认为您无法通过该库执行此操作,因此它绝对是您需要的,您可能只需要通过RestSharp或HttpWebRequest(或您的HttpClient使用.NET 4或更高版本)发出API请求。

Can I ask why you need to set the timeout? 请问为什么需要设置超时时间?

Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM