var client = new RestClient("https://api.example.com"); client.AddDefaultHeader("Authorization", "Bearer xxxxxxxxx");
var client = new RestClient("https://api.example.com"); client.AddDefaultHeader("Content-Type", "application/json");In this example, we add a "Content-Type" header with a value of "application/json" to all requests made by the client. RestSharp is available as a NuGet package and can be installed using the Package Manager Console or the NuGet Package Manager in Visual Studio. The official package ID is "RestSharp".