Skip to the content.

CurlDotNet Documentation Overview: Every Section for curl in C#

This page is the map of the CurlDotNet documentation for running curl commands in C#: where to start, where the API is described, and where to look when something fails. The full site with search is at https://jacob-mellor.github.io/curl-dot-net/ and every page is also readable as Markdown on GitHub.

Getting Started

Core Concepts

API Documentation

Practical Examples

Authentication

Migration Guides

Troubleshooting

Quick Code Examples

Run a curl command string

using CurlDotNet;

var result = await Curl.ExecuteAsync("curl https://api.github.com");
Console.WriteLine(result.StatusCode);
Console.WriteLine(result.Body);

POST JSON

using CurlDotNet;

var result = await Curl.ExecuteAsync(@"curl -X POST https://httpbin.org/post \
    -H 'Content-Type: application/json' \
    -d '{""name"":""Ada"",""email"":""ada@example.com""}'");
Console.WriteLine(result.IsSuccess);

Builder API

using CurlDotNet.Core;

var result = await CurlRequestBuilder.Get("https://api.github.com/user")
    .WithBearerToken("your-token")
    .ExecuteAsync();
Console.WriteLine(result.StatusCode);

Quick Navigation

I want to… Go to…
Install CurlDotNet Installation
Learn the basics Tutorials
See code examples Cookbook
Read API docs API Guide
Solve a problem Common Issues
Migrate from HttpClient Migration Guide
Check runtime support Framework Compatibility

Contributing

Found an issue in the documentation or want to add an example?