Skip to content

Extension method RestClientExtensions.ExecuteDynamic throws InvalidCastException  #536

@Elywejnak

Description

@Elywejnak

Hi, method RestClientExtensions.ExecuteDynamic throws InvalidCastException : Unable to cast object of type 'RestSharp.RestResponse' to type 'RestSharp.RestResponse`1[System.Object]'.
on line

var generic = (RestResponse<dynamic>)response;

Using generic Execute method repairs problem

var response = client.Execute<dynamic>(request);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions