Simple REST and HTTP API client for .NET
open sourceApache-2.0free
RestSharp is a lightweight HTTP API client library for .NET, built as a wrapper around HttpClient. It adds default parameters of any kind, query, URL segment, header, cookie and body parameters, request bodies as JSON, XML, URL-encoded or multipart form data with files, serialization and deserialization of JSON, XML and CSV (with System.Text.Json by default and optional Newtonsoft.Json, XML and CsvHelper serializer packages), and authenticators for signing requests. Its API is async throughout, with sync overloads for older code. It's a .NET Foundation project with a single maintainer.
Problems it solves
- call a REST API from my C# app without writing HttpClient boilerplate
- send a multipart form with a file upload from .NET
- deserialize a JSON API response into a C# class
Features
- wrapper around HttpClient
- query, URL segment, header, cookie and body parameters
- JSON, XML, form and multipart request bodies
- JSON, XML and CSV serialization with pluggable serializers
- authenticators
- async API with sync overloads