File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,19 @@ var response = await client
2929
3030Timeouts link with any caller-provided ` CancellationToken ` ; whichever triggers first will cancel the request.
3131
32+ ### Clear Timeouts
33+
34+ Any timeouts that have been set can be clearing using ` ClearTimeout ` . This is most useful when the ` HttpRequestBuilder ` is being reused.
35+
36+ ``` csharp
37+ var builder = client
38+ .UsingBase ()
39+ .WithRoute (" /todos/1" )
40+ .WithTimeout (TimeSpan .FromMilliseconds (750 ));
41+
42+ builder .ClearTimeout ();
43+ ```
44+
3245## Behavior Notes
3346
3447* The timeout applies only to the current request and does not affect any other requests sent using the same ` HttpClient ` instance.
@@ -40,5 +53,6 @@ Timeouts link with any caller-provided `CancellationToken`; whichever triggers f
4053
4154| Method | Purpose |
4255| ----------------------- | ------------------------------------------------- |
56+ | ` ClearTimeout() ` | Removes any per-request timeout. |
4357| ` WithTimeout(int) ` | Applies a per-request timeout using seconds. |
4458| ` WithTimeout(TimeSpan) ` | Applies a per-request timeout using a ` TimeSpan ` . |
You can’t perform that action at this time.
0 commit comments