简体   繁体   中英

Skip request restsharp

a question about restsharp. How can I skip receiving a request? that is, there is a mandatory sequence of requests. I have to send a request but not get a response. The problem is this request loads a heavy page, and I don't need it. client.execute.skip??

Use timeout .

    var client = new RestClient(BaseUrl);
    client.Timeout = 10000; // 10000 milliseconds == 10 seconds

or u can extend like this

https://exceptionnotfound.net/extending-restsharp-to-handle-timeouts-in-asp-net-mvc/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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