diff --git a/.github/workflows/test-results.yml b/.github/workflows/test-results.yml index 394bf9dc7..9288e5450 100644 --- a/.github/workflows/test-results.yml +++ b/.github/workflows/test-results.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Download and Extract Artifacts - uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d + uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe with: run_id: ${{ github.event.workflow_run.id }} path: artifacts diff --git a/Directory.Packages.props b/Directory.Packages.props index fd7ce005e..6c9973579 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -28,10 +28,10 @@ - + - + diff --git a/src/RestSharp/Request/RestRequest.cs b/src/RestSharp/Request/RestRequest.cs index 40b8e074c..90854652f 100644 --- a/src/RestSharp/Request/RestRequest.cs +++ b/src/RestSharp/Request/RestRequest.cs @@ -166,6 +166,11 @@ public RestRequest(Uri resource, Method method = Method.Get) /// Can be used to skip container or root elements that do not have corresponding deserialization targets. /// public string? RootElement { get; set; } + + /// + /// HTTP version for the request. Default is Version11. + /// + public Version Version { get; set; } = HttpVersion.Version11; /// /// When supplied, the function will be called before calling the deserializer diff --git a/src/RestSharp/RestClient.Async.cs b/src/RestSharp/RestClient.Async.cs index 55e02c70c..ce6706216 100644 --- a/src/RestSharp/RestClient.Async.cs +++ b/src/RestSharp/RestClient.Async.cs @@ -113,6 +113,7 @@ async Task ExecuteRequestAsync(RestRequest request, CancellationTo message.Content = requestContent.BuildContent(); message.Headers.Host = Options.BaseHost; message.Headers.CacheControl = request.CachePolicy ?? Options.CachePolicy; + message.Version = request.Version; using var timeoutCts = new CancellationTokenSource(request.Timeout ?? Options.Timeout ?? _defaultTimeout); using var cts = CancellationTokenSource.CreateLinkedTokenSource(timeoutCts.Token, cancellationToken);