How to use RestSharp.NetCore in asp.net core
<p>I have gone through the <a href="http://restsharp.org/" rel="noreferrer">http://restsharp.org/</a> code which work greats. Below is the code of RestSharp with out asp.net core .</p>

<pre><code>public GenericResponseObject&lt;T&gt; GetGeneric&lt;T&gt;(string operation, params KeyValuePair&lt;string, string&gt;[] nameValues) where T : class
{
    RestClient client = new RestClient(_baseUrl)
    {
        Authenticator = new HttpBasicAuthenticator(_username, _password)
    };

    RestRequest request = new RestRequest(operation, Method.GET);

    foreach (KeyValuePair&lt;string, string&gt; nameValue in nameValues)
    {
        request.AddQueryParameter(nameValue.Key, nameValue.Value);
    }

    IRestResponse&lt;GenericResponseObject&lt;T&gt;&gt; response = client.Execute&lt;GenericResponseObject&lt;T&gt;&gt;(request);
        GenericResponseObject&lt;T&gt; responseObject = response.Data;
        return responseObject;
    }
}
</code></pre>

<p>This code works great to me. Now I want to implement same code in asp.net core. </p>

<p>Can I get a sample example how to use RestSharp in asp.net core. I have added the dependency <strong>RestSharp.NetCore": 105.2.3</strong>.</p>