Soenneker.GitLab.HttpClients
11.0.201
Prefix Reserved
dotnet add package Soenneker.GitLab.HttpClients --version 11.0.201
NuGet\Install-Package Soenneker.GitLab.HttpClients -Version 11.0.201
<PackageReference Include="Soenneker.GitLab.HttpClients" Version="11.0.201" />
<PackageVersion Include="Soenneker.GitLab.HttpClients" Version="11.0.201" />
<PackageReference Include="Soenneker.GitLab.HttpClients" />
paket add Soenneker.GitLab.HttpClients --version 11.0.201
#r "nuget: Soenneker.GitLab.HttpClients, 11.0.201"
#:package Soenneker.GitLab.HttpClients@11.0.201
#addin nuget:?package=Soenneker.GitLab.HttpClients&version=11.0.201
#tool nuget:?package=Soenneker.GitLab.HttpClients&version=11.0.201
Soenneker.GitLab.HttpClients
Provide a cached, authenticated HttpClient for the generated GitLab OpenAPI client, with support for GitLab.com and self-managed instances.
Installation
dotnet add package Soenneker.GitLab.HttpClients
Configuration
GitLab.com with a personal, project, or group access token:
{
"GitLab": {
"ApiKey": "gitlab-token"
}
}
The default base URL is https://gitlab.com/, and requests use Authorization: Bearer <token>.
For a self-managed instance or a different authentication header:
{
"GitLab": {
"ApiKey": "gitlab-token",
"ClientBaseUrl": "https://gitlab.example.com/",
"AuthHeaderName": "PRIVATE-TOKEN",
"AuthHeaderValueTemplate": "{token}"
}
}
Use the GitLab host root as ClientBaseUrl; the generated client adds /api/v4 to endpoint paths.
Registration and usage
services.AddGitLabOpenApiHttpClientAsSingleton();
HttpClient client = await gitLabHttpClient.Get(cancellationToken);
Get returns the same client for the lifetime of that provider instance. AddGitLabOpenApiHttpClientAsScoped() creates one provider-owned client per scope. Disposing either provider lifetime removes and disposes the client owned by that provider.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Extensions.Configuration (>= 11.0.921)
- Soenneker.Utils.HttpClientCache (>= 11.0.2188)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.GitLab.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.GitLab.OpenApiClientUtil
Provides a cached GitLab OpenAPI client backed by an authenticated HTTP provider |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.201 | 87 | 12/3/2026 |
| 11.0.200 | 86 | 12/3/2026 |
| 11.0.199 | 91 | 12/3/2026 |
| 11.0.198 | 85 | 12/3/2026 |
| 11.0.197 | 86 | 12/3/2026 |
| 11.0.196 | 83 | 12/2/2026 |
| 11.0.195 | 90 | 12/2/2026 |
| 11.0.194 | 93 | 12/2/2026 |
| 11.0.193 | 90 | 12/2/2026 |
| 11.0.192 | 88 | 12/2/2026 |
| 11.0.191 | 120 | 12/2/2026 |
| 11.0.190 | 99 | 12/2/2026 |
| 11.0.189 | 97 | 12/2/2026 |
| 11.0.188 | 98 | 12/1/2026 |
| 11.0.187 | 99 | 12/1/2026 |
| 11.0.186 | 115 | 12/1/2026 |
| 11.0.185 | 100 | 12/1/2026 |
| 11.0.184 | 98 | 12/1/2026 |
| 11.0.183 | 103 | 12/1/2026 |
| 11.0.182 | 127 | 11/30/2026 |
Updated Multiple NuGet packages