DevBase.Net
1.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DevBase.Net --version 1.1.0
NuGet\Install-Package DevBase.Net -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DevBase.Net" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DevBase.Net" Version="1.1.0" />
<PackageReference Include="DevBase.Net" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DevBase.Net --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DevBase.Net, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DevBase.Net@1.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DevBase.Net&version=1.1.0
#tool nuget:?package=DevBase.Net&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DevBase.Net
A modern, high-performance HTTP client library for .NET 9.0 with fluent API, SOCKS5 proxy support, retry policies, and advanced response parsing.
Features
- Fluent request builder API
- SOCKS5 proxy support with HttpToSocks5Proxy
- Configurable retry policies (linear/exponential backoff)
- JSON, HTML, XML parsing
- JSON Path queries
- Response streaming
- Request/Response interceptors
- Detailed request metrics
- Connection pooling
Installation
dotnet add package DevBase.Net
Quick Start
using DevBase.Net.Core;
// Simple GET request
var response = await new Request("https://api.example.com/data").SendAsync();
string content = await response.GetStringAsync();
// POST with JSON
var response = await new Request("https://api.example.com/users")
.AsPost()
.WithJsonBody(new { name = "John" })
.SendAsync();
Usage Examples
HTTP Methods
// GET (default)
var response = await new Request(url).SendAsync();
// POST
var response = await new Request(url).AsPost().WithJsonBody(data).SendAsync();
// PUT
var response = await new Request(url).AsPut().WithJsonBody(data).SendAsync();
// DELETE
var response = await new Request(url).AsDelete().SendAsync();
Headers and Authentication
var response = await new Request(url)
.WithHeader("Authorization", "Bearer token")
.WithHeader("X-Custom", "value")
.SendAsync();
Response Parsing
// JSON
var data = await response.ParseJsonAsync<MyType>();
// JSON Path
var value = await response.ParseJsonPathAsync<string>("$.user.name");
// HTML
var doc = await response.ParseHtmlAsync();
// String
var text = await response.GetStringAsync();
SOCKS5 Proxy
using DevBase.Net.Proxy.HttpToSocks5;
var proxy = new HttpToSocks5Proxy("127.0.0.1", 9050);
var response = await new Request(url)
.WithProxy(proxy)
.SendAsync();
Retry Policies
var response = await new Request(url)
.WithRetryPolicy(RetryPolicy.Exponential(maxRetries: 3))
.SendAsync();
Credits
HttpToSocks5Proxy based on MihaZupan/HttpToSocks5Proxy (MIT License).
License
MIT License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- AngleSharp (>= 1.4.0)
- BouncyCastle.NetCore (>= 2.2.1)
- DevBase (>= 1.3.4)
- DevBase.Cryptography (>= 1.0.5)
- DevBase.Cryptography.BouncyCastle (>= 1.2.1)
- Newtonsoft.Json (>= 13.0.4)
- Newtonsoft.Json.Schema (>= 4.0.1)
- Serilog (>= 4.3.0)
- System.IO.Pipelines (>= 10.0.1)
- ZiggyCreatures.FusionCache (>= 2.4.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DevBase.Net:
| Package | Downloads |
|---|---|
|
DevBase.Api
DevBase.Api is designed to connect to certain api endpoints including Replicate.com, Tidal and Deezer |
GitHub repositories
This package is not used by any popular GitHub repositories.