In this example, we create a RestClient object for the base URL "https://jsonplaceholder.typicode.com". We then create a RestRequest object for the "/posts" endpoint and specify the HTTP method as GET. Finally, we execute the request using the Execute method and get the response content. Code Example 2: POST request using RestSharp RestClientcsharp // Create RestClient var client = new RestClient("https://jsonplaceholder.typicode.com"); // Create RestRequest object for POST request var request = new RestRequest("/posts", Method.POST); // Add request body request.AddJsonBody(new { title = "Test", body = "Test body", userId = 1 }); // Execute request and get response content IRestResponse response = client.Execute(request); var content = response.Content; // Returns JSON response from endpoint ``` In this example, we create a RestClient object for the base URL "https://jsonplaceholder.typicode.com". We then create a RestRequest object for the "/posts" endpoint and specify the HTTP method as POST. We also add a request body in JSON format. Finally, we execute the request using the Execute method and get the response content. The package library used in these examples is RestSharp.