【问题标题】:What is the Maximum Time we can set using RestRequest.Timeout C#?我们可以使用 RestRequest.Timeout C# 设置的最长时间是多少?
【发布时间】:2021-11-15 18:59:26
【问题描述】:

我想设置 10 分钟来执行操作,但它似乎只等待 4 分钟。这是最长时间吗?有什么办法可以设置 10 分钟的等待时间?

这是我的例子:

        RestRequest rr = FormRequest(Method.POST, url);
        rr.Timeout = 600000; // 10 min in millisecond
        rr.AddJsonBody(input);
        return ExecuteRequest(rr);

【问题讨论】:

    标签: c# timeout


    【解决方案1】:

    尝试使用 Thread.sleep(timelimit)

    【讨论】:

    • “sleep”应该以大写开头
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-25
    • 1970-01-01
    相关资源
    最近更新 更多