Soenneker.GitHub.Client.Http 4.0.1458

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.GitHub.Client.Http

Provides a cached HttpClient configured for GitHub's REST API, media type, API version, and bearer authentication.

Installation

dotnet add package Soenneker.GitHub.Client.Http

Configure and register

{
  "GH": {
    "Token": "your-github-token",
    "RequestResponseLogging": false
  }
}
using Soenneker.GitHub.Client.Http.Registrars;

services.AddGitHubHttpClientAsSingleton();

Keep the token in secret storage. Enable request/response logging only for controlled diagnostics: the authorization header is redacted, but URLs and bodies can still contain sensitive repository data.

Use the client

using Soenneker.GitHub.Client.Http.Abstract;

public sealed class GitHubRepositoryReader(IGitHubHttpClient clients)
{
    public async Task<HttpResponseMessage> Get(
        string owner,
        string repository,
        CancellationToken cancellationToken)
    {
        HttpClient client = await clients.Get(cancellationToken);
        return await client.GetAsync($"repos/{owner}/{repository}", cancellationToken);
    }
}

Callers borrow the returned client and must not dispose it. The provider removes its own cached client when disposed. Scoped providers use isolated cache entries, so disposing one scope cannot destroy another scope's transport.

Product Compatible and additional computed target framework versions.
.NET 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 (2)

Showing the top 2 NuGet packages that depend on Soenneker.GitHub.Client.Http:

Package Downloads
Soenneker.GitHub.ClientUtil

Provides lazy, cached access to the generated GitHub REST API client.

Soenneker.GitHub.Repositories.Rulesets

Creates, lists, and deletes GitHub repository rulesets

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.1458 1,404 9/9/2026
4.0.1457 85 9/9/2026
4.0.1456 255 9/9/2026
4.0.1455 105 9/9/2026
4.0.1454 1,089 9/9/2026
4.0.1453 159 9/9/2026
4.0.1452 60 9/8/2026
4.0.1451 997 9/8/2026
4.0.1450 2,029 9/8/2026
4.0.1449 1,335 9/8/2026
4.0.1448 1,237 9/8/2026
4.0.1447 271 9/8/2026
4.0.1446 75 9/8/2026
4.0.1445 100 9/7/2026
4.0.1444 958 9/7/2026
4.0.1442 76 9/7/2026
4.0.1441 1,639 9/7/2026
4.0.1440 92 9/7/2026
4.0.1439 5,650 9/5/2026
4.0.1438 399 9/5/2026
Loading failed

Updated Multiple NuGet packages