Integration of TlsClient.NET with RestSharp.
This package allows you to make HTTP requests using RestSharp while benefiting from advanced TLS fingerprinting and browser emulation features provided by TlsClient.NET.
Install from NuGet:
dotnet add package TlsClient.Provider.RestSharpπ‘
TlsRestClientBuilderreturns a standardRestClientinstance. That means you can continue using all features of RestSharp exactly the same way as before.
using RestSharp;
using TlsClient.Core;
using TlsClient.RestSharp.Helpers.Builders;
// initialize Wrapper
TlsClient.Initialize("{LIBRARY_PATH}");
// initialize TlsClient with desired options
var tlsClient = new TlsClientBuilder()
.WithIdentifier(TlsClientIdentifier.Chrome133)
.WithUserAgent("TlsClient.NET 1.0")
.Build();
// build RestClient with TlsRestClientBuilder
var restClient = new TlsRestClientBuilder()
.WithTlsClient(tlsClient)
.WithBaseUrl("https://httpbin.org")
.WithCookieContainer(CookieContainer? cookieContainer= null)
.Build();
// make request
var request = new RestRequest("/get", Method.Get);
var response = await restClient.ExecuteAsync(request);
Console.WriteLine(response.Content);This project is licensed under the MIT License. See the LICENSE file for details.