Skip to the content.

Migration Guides

Moving to CurlDotNet from another HTTP client? These guides will help you migrate your existing code with minimal effort.

Available Migration Guides

Migrating from HttpClient

Learn how to replace System.Net.Http.HttpClient with CurlDotNet, including:

Migrating from RestSharp

Transition from RestSharp to CurlDotNet with:

Why Migrate to CurlDotNet?

From HttpClient

From RestSharp

Quick Comparison

HttpClient

// HttpClient
using var client = new HttpClient();
var response = await client.GetAsync("https://api.example.com/data");
var content = await response.Content.ReadAsStringAsync();

// CurlDotNet
var curl = new Curl();
var result = await curl.GetAsync("https://api.example.com/data");
var content = result.Data;

RestSharp

// RestSharp
var client = new RestClient("https://api.example.com");
var request = new RestRequest("data", Method.GET);
var response = await client.ExecuteAsync(request);

// CurlDotNet
var curl = new Curl();
var result = await curl.GetAsync("https://api.example.com/data");

Migration Tools

We provide helpers to make migration easier:

Getting Started

  1. Choose your migration guide based on your current client
  2. Review the key differences and benefits
  3. Follow the step-by-step migration examples
  4. Test your migrated code thoroughly
  5. Enjoy the simplicity and reliability of CurlDotNet!

Need Help?