< Summary

Information
Class: Syki.Front.Configs.HttpConfigs
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Configs/HttpConfigs.cs
Tag: 22_11348620282
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 18
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AddHttpConfigs(...)100%210%

File(s)

/home/runner/work/syki/syki/Front/Configs/HttpConfigs.cs

#LineLine coverage
 1namespace Syki.Front.Configs;
 2
 3public static class HttpConfigs
 4{
 5    public static void AddHttpConfigs(this WebAssemblyHostBuilder builder)
 6    {
 07        builder.Services.AddScoped<SykiDelegatingHandler>();
 8
 09        var apiUrl = builder.Configuration.GetSection("ApiUrl").Value!;
 10
 011        builder.Services
 012            .AddHttpClient("HttpClient", x => x.BaseAddress = new Uri(apiUrl))
 013            .AddHttpMessageHandler<SykiDelegatingHandler>();
 14
 015        builder.Services.AddScoped(sp => sp.GetRequiredService<IHttpClientFactory>()
 016            .CreateClient("HttpClient"));
 017    }
 18}