Rest Client connection using C#. In this post, I have explained the very simple solution using RestSharp Library. In RestSharp library, we have RestClient and RestRequest classes. RestClient will help us to establish the connection using API URL, RestRequest object will act as the intermediate between RestClient and API HOST. Using RestRequest, we will define the header and Request Method.