Soenneker.PostHog.HttpClients
4.0.108
Prefix Reserved
dotnet add package Soenneker.PostHog.HttpClients --version 4.0.108
NuGet\Install-Package Soenneker.PostHog.HttpClients -Version 4.0.108
<PackageReference Include="Soenneker.PostHog.HttpClients" Version="4.0.108" />
<PackageVersion Include="Soenneker.PostHog.HttpClients" Version="4.0.108" />
<PackageReference Include="Soenneker.PostHog.HttpClients" />
paket add Soenneker.PostHog.HttpClients --version 4.0.108
#r "nuget: Soenneker.PostHog.HttpClients, 4.0.108"
#:package Soenneker.PostHog.HttpClients@4.0.108
#addin nuget:?package=Soenneker.PostHog.HttpClients&version=4.0.108
#tool nuget:?package=Soenneker.PostHog.HttpClients&version=4.0.108
Soenneker.PostHog.HttpClients
Provides a cached HttpClient authenticated for PostHog's projects, organizations, insights, feature flags, experiments, dashboards, and other management APIs.
Installation
dotnet add package Soenneker.PostHog.HttpClients
Configuration
{
"PostHog": {
"ApiKey": "your-personal-api-key",
"ClientBaseUrl": "https://us.posthog.com/"
}
}
Use the host for the account's region, such as https://us.posthog.com/ or https://eu.posthog.com/, or the root URL of a self-hosted deployment. The key must be a personal API key with the scopes required by the endpoints you call; a project API key used for event ingestion is not a substitute.
Usage
using Soenneker.PostHog.HttpClients.Abstract;
using Soenneker.PostHog.HttpClients.Registrars;
services.AddPostHogOpenApiHttpClientAsSingleton();
IPostHogOpenApiHttpClient postHog = serviceProvider
.GetRequiredService<IPostHogOpenApiHttpClient>();
HttpClient client = await postHog.Get(cancellationToken);
HttpResponseMessage response = await client.GetAsync(
"api/projects/",
cancellationToken);
response.EnsureSuccessStatusCode();
The provider owns the cached client. Scoped provider registrations use separate cache entries, so disposing one scope does not invalidate another scope's client.
| Product | Versions 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. |
-
net10.0
- Soenneker.Extensions.Configuration (>= 4.0.891)
- Soenneker.Utils.HttpClientCache (>= 4.0.2080)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.PostHog.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.PostHog.OpenApiClientUtil
Provides a cached, configured client for PostHog's management API. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.108 | 30 | 9/15/2026 |
| 4.0.107 | 93 | 9/13/2026 |
| 4.0.106 | 84 | 9/13/2026 |
| 4.0.105 | 89 | 9/13/2026 |
| 4.0.104 | 90 | 9/12/2026 |
| 4.0.103 | 99 | 9/12/2026 |
| 4.0.102 | 75 | 9/12/2026 |
| 4.0.101 | 122 | 9/9/2026 |
| 4.0.100 | 107 | 9/9/2026 |
| 4.0.99 | 100 | 9/9/2026 |
| 4.0.98 | 104 | 9/8/2026 |
| 4.0.97 | 123 | 9/8/2026 |
| 4.0.96 | 103 | 9/8/2026 |
| 4.0.95 | 109 | 9/7/2026 |
| 4.0.94 | 111 | 9/7/2026 |
| 4.0.93 | 111 | 9/7/2026 |
| 4.0.92 | 110 | 9/5/2026 |
| 4.0.91 | 94 | 9/5/2026 |
| 4.0.90 | 120 | 9/4/2026 |
| 4.0.89 | 104 | 9/4/2026 |