Soenneker.GitHub.Client.Http 11.0.1569

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

Use GetForUpload(cancellationToken) for asset uploads. It returns a separate cached client with a 10-minute overall request timeout and the same authentication and logging settings. Get keeps its existing default timeout. Caller cancellation tokens can cancel upload requests earlier.

Callers borrow the returned clients and must not dispose them. The provider removes both cached clients 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 net11.0 is compatible. 
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
11.0.1569 4,725 11/19/2026
11.0.1568 401 11/19/2026
11.0.1567 433 11/18/2026
11.0.1566 492 11/18/2026
11.0.1564 144 11/18/2026
11.0.1563 118 11/18/2026
11.0.1562 6,048 11/15/2026
11.0.1561 257 11/15/2026
11.0.1560 613 11/15/2026
11.0.1559 5,674 11/11/2026
11.0.1558 749 11/11/2026
11.0.1557 95 11/11/2026
11.0.1556 855 11/11/2026
11.0.1555 562 11/11/2026
11.0.1553 664 11/11/2026
11.0.1552 643 11/11/2026
11.0.1551 125 11/11/2026
11.0.1549 107 11/11/2026
11.0.1548 811 11/11/2026
11.0.1547 914 11/11/2026
Loading failed

Updated Multiple NuGet packages