HttpClientLibrary.04.17.24.001 1.0.0

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

HttpClientHelper NuGet Package

Overview

The HttpClientHelper NuGet package provides a convenient wrapper around the HttpClient class for making HTTP requests in .NET applications. It simplifies common HTTP operations such as GET, POST, PUT, and DELETE requests, as well as handling access token retrieval.

Features

  • GET Request: Retrieve data from a specified URI.
  • POST Request: Send data to a specified URI.
  • PUT Request: Update data at a specified URI.
  • DELETE Request: Delete data at a specified URI.
  • Access Token Retrieval: Obtain access tokens using various grant types.

Installation

You can install the HttpClientHelper NuGet package via NuGet Package Manager or NuGet CLI:

Package Manager:

Install-Package HttpClientLibrary.04.17.24.001

.NET CLI:

dotnet add package HttpClientLibrary.04.17.24.001

Usage

Basic Usage:

using HttpClientHelper;

// Create an instance of HttpClientHelper
var httpClientHelper = new HttpClientHelper(new HttpClient());

// Send a GET request
var data = await httpClientHelper.HttpRetrieveAllAsync<T>("https://api.example.com/data");

// Send a POST request
var model = new YourModel();
var postResponse = await httpClientHelper.HttpPostAsync("https://api.example.com/resource", model);

// Send a PUT request
var putResponse = await httpClientHelper.HttpPutAsync("https://api.example.com/resource/123", model);

// Send a DELETE request
var deleteResponse = await httpClientHelper.HttpDeleteAsync("https://api.example.com/resource/123");

Access Token Retrieval:

using HttpClientHelper;

// Create an instance of HttpClientHelper
var httpClientHelper = new HttpClientHelper(new HttpClient());

// Define your access token model
var accessTokenModel = new AccessTokenModel
{
    Username = "your_username",
    Password = "your_password",
    GrantType = "password",
    RequestUrl = "https://api.example.com/token"
};

// Retrieve access token
var accessTokenResponse = await httpClientHelper.HttpRetrieveAccessTokenAsync(accessTokenModel);

Contributions

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or create a pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Feel free to customize this template according to your specific requirements and add any additional information you find necessary.

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 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.

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
1.0.0 148 4/17/2024