mirror of
https://github.com/fiodarsazanavets/aspire-13-examples.git
synced 2026-06-20 12:23:14 +00:00
21 lines
491 B
C#
21 lines
491 B
C#
using Microsoft.AspNetCore.SignalR.Client;
|
|
|
|
namespace OnlineShop.Web.Extensions;
|
|
|
|
public static class HubConnectionExtensions
|
|
{
|
|
public static IHubConnectionBuilder WithUrl(
|
|
this IHubConnectionBuilder builder,
|
|
string url,
|
|
IHttpMessageHandlerFactory clientFactory)
|
|
{
|
|
return builder.WithUrl(
|
|
url, options =>
|
|
{
|
|
options.HttpMessageHandlerFactory =
|
|
_ => clientFactory.CreateHandler();
|
|
});
|
|
}
|
|
}
|
|
|