Skip to content

Null Version in RestResponse<T> #2196

Description

@biasso

Describe the bug
RestResponse<T> always has a null Version.

To Reproduce

usingRestSharp;varclient=newRestClient();varrequest=newRestRequest("https://dummyjson.com/products/1");varresponse=awaitclient.ExecuteAsync(request);Console.WriteLine($"Version {response.Version}");// Version 1.1varresponse2=awaitclient.ExecuteAsync<object>(request);Console.WriteLine($"Version {response2.Version}");// Version (null)

Expected behavior
RestResponse<T> should have Version set.

Desktop (please complete the following information):

  • OS: all
  • .NET version: all
  • Version: 110.2.0

Additional context
The version is not copied from the RestResponse in this method: https://github.com/restsharp/RestSharp/blob/dev/src/RestSharp/Response/RestResponse.cs#L35

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions