HttpClientLite 1.0.0

dotnet add package HttpClientLite --version 1.0.0                
NuGet\Install-Package HttpClientLite -Version 1.0.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="HttpClientLite" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HttpClientLite --version 1.0.0                
#r "nuget: HttpClientLite, 1.0.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.
// Install HttpClientLite as a Cake Addin
#addin nuget:?package=HttpClientLite&version=1.0.0

// Install HttpClientLite as a Cake Tool
#tool nuget:?package=HttpClientLite&version=1.0.0                

HttpClientLite

Description

HttpClientLite is a.NET-based, highly scalable HTTP client management library that provides comprehensive management of HTTP requests, including:

  • Request/response configuration
  • Exception handling
  • Supports synchronous and asynchronous operations
  • Rich extension methods, support GET, POST, PUT and other operations
  • Supports FormData and JSON data transmission

Feature

  1. Highly modular : Easily expand functionality through configuration and processor.
  2. Request cloning : Support for 'HttpRequestMessage' cloning, easy to retry or log processing.
  3. Extended Method : Provides a simplified method of common HTTP requests.
  4. Exception Management : Supports custom exception handling logic.

Software Architecture

Supports net4.6.2, net4.7.2, net4.8.1, net6, net8, and net9

Installation

dotnet add package HttpClientLite

Usage

using HttpClientLite;
using HttpClientLite.Handlers.interfaces;
using HttpClientLite.Configurations.interfaces;

var httpManager = new HttpManager("https://api.example.com");
Send GET request
var req = new HttpRequestMessage(HttpMethod.Get);
var response = await httpManager.SendAsync(req);
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);

Configuration

Configuration HttpManager

Custom classes inherit and implement HttpClientLite.Configurations.interfaces.IHttpManagerConfiguration

httpManager.Configuration(new CustomHttpManagerConfiguration());
Configuration HttpClient

Custom classes inherit and implement HttpClientLite.Configurations.interfaces.IHttpClientConfiguration

httpManager.Configuration(new CustomHttpClientConfiguration());
Configuration HttpRequestMessage

Custom classes inherit and implement HttpClientLite.Configurations.interfaces.IRequestMessageConfiguration

httpManager.Configuration(new CustomRequestMessageConfiguration());
Customize response handling

Custom classes inherit and implement HttpClientLite.Handlers.interfaces.IResponseMessageHandler

httpManager.Handler(new CustomResponseMessageHandler());
Custom exception handling

Custom classes inherit and implement HttpClientLite.Handlers.interfaces.IHttpManagerExceptionHandler

httpManager.Handler(new CustomHttpManagerExceptionHandler());

Contribution

  1. Fork the repository
  2. Create Feat_xxx branch
  3. Commit your code
  4. Create Pull Request
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on HttpClientLite:

Package Downloads
HttpClientLite.Extensions

HttpClientLite 是一个基于 .NET 的高可扩展 HTTP 客户端管理库,提供了对 HTTP 请求的全面管理,包括: - 请求/响应配置 - 异常处理 - 支持同步与异步操作 - 丰富的扩展方法,支持 GET、POST、PUT 等操作 - 支持 FormData 和 JSON 数据传输

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 89 12/7/2024