Bat.Http 10.0.1

dotnet add package Bat.Http --version 10.0.1
                    
NuGet\Install-Package Bat.Http -Version 10.0.1
                    
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="Bat.Http" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bat.Http" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Bat.Http" />
                    
Project file
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 Bat.Http --version 10.0.1
                    
#r "nuget: Bat.Http, 10.0.1"
                    
#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 Bat.Http@10.0.1
                    
#: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=Bat.Http&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Bat.Http&version=10.0.1
                    
Install as a Cake Tool

For use Bat.Http just do it :

1- Install Bat.Http on your project

2- Use it in bussiness logic

for example :

```
public class BaseService : IBaseService
{
    private readonly HttpClient _httpClient;

    public BaseService(IHttpClientFactory httpClientFactory)
    {
        _httpClient = httpClientFactory.CreateClient();
    }

    public void UseBatHttpSample()
    {
        var newObject = new
        {
            Id = 1,
            FirstName = "Mehran",
            LastName = "Norouzi"
        };
    
        var requestHeader = new Dictionary<string, string>
        {
            {"Authorization", "Bearer fjfksjfk-sdklsdjfsddsjkljsdklfj_sakd" }
        };

        string IP = ClientInfo.GetIP(HttpContext);
        RequestDetails requestDetails = ClientInfo.GetRequestDetails(HttpContext);

        var result1 = await HttpRequestTools.GetAsync(httpClient: _httpClient, url: "https://someSite.com");
        var result2 = await HttpRequestTools.PostAsync(httpClient: _httpClient, url: "https://someSite.com", 
                    contentJsonString: newObject.SerializeToJson(), header: requestHeader);
        var result3 = await HttpRequestTools.PutAsync(httpClient: _httpClient, url: "https://someSite.com", 
                    contentJsonString: newObject.SerializeToJson(), header: requestHeader);
        var result4 = await HttpRequestTools.DeleteAsync(httpClient: _httpClient, url: "https://someSite.com", 
                    contentJsonString: newObject.SerializeToJson(), header: requestHeader);

    }
}
```
Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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 is compatible.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.1 198 12/24/2025
10.0.0 167 12/24/2025
8.0.11 370 11/26/2024
8.0.2 310 3/5/2024
8.0.1 247 1/22/2024
8.0.0 289 12/1/2023
7.0.3 412 3/1/2023
7.0.0 500 12/5/2022
6.0.22 326 8/19/2023
6.0.21 302 8/19/2023
6.0.1 982 3/27/2022
1.1.4 1,569 10/18/2021
1.1.3 884 7/12/2021
1.1.2 1,086 4/8/2021
1.1.0 1,277 3/26/2021
1.0.7 806 2/4/2021
1.0.6 598 1/5/2021
1.0.5 626 11/26/2020
1.0.4 982 10/19/2020

- Upgrade to net10.0 and C#14.0
- Add new extension methods for send all type of http request
- Add extension methods for get client informations