[PR #11067] Add helpers to register and get a plugin HttpClient #12718

Open
opened 2026-02-07 07:00:40 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/jellyfin/jellyfin/pull/11067

State: open
Merged: No


Usage:

Register:

public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
{
    applicationHost.AddPluginHttpClient<PluginType>(serviceCollection);
}

Get:

var httpClient = httpClientFactory.GetPluginHttpClient<PluginType>();

where PluginType : BasePlugin

**Original Pull Request:** https://github.com/jellyfin/jellyfin/pull/11067 **State:** open **Merged:** No --- Usage: Register: ```c# public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost) { applicationHost.AddPluginHttpClient<PluginType>(serviceCollection); } ``` Get: ```c# var httpClient = httpClientFactory.GetPluginHttpClient<PluginType>(); ``` where `PluginType : BasePlugin`
OVERLORD added the pull-request label 2026-02-07 07:00:40 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#12718