Soenneker.Nws.HttpClients
11.0.192
Prefix Reserved
dotnet add package Soenneker.Nws.HttpClients --version 11.0.192
NuGet\Install-Package Soenneker.Nws.HttpClients -Version 11.0.192
<PackageReference Include="Soenneker.Nws.HttpClients" Version="11.0.192" />
<PackageVersion Include="Soenneker.Nws.HttpClients" Version="11.0.192" />
<PackageReference Include="Soenneker.Nws.HttpClients" />
paket add Soenneker.Nws.HttpClients --version 11.0.192
#r "nuget: Soenneker.Nws.HttpClients, 11.0.192"
#:package Soenneker.Nws.HttpClients@11.0.192
#addin nuget:?package=Soenneker.Nws.HttpClients&version=11.0.192
#tool nuget:?package=Soenneker.Nws.HttpClients&version=11.0.192
Soenneker.Nws.HttpClients
Provides a cached HttpClient with the User-Agent header required by the National Weather Service API.
Installation
dotnet add package Soenneker.Nws.HttpClients
Configuration
{
"Nws": {
"UserAgent": "my-weather-app/1.0 (contact@example.com)"
}
}
Nws:ClientBaseUrl can override the default https://api.weather.gov endpoint.
Usage
using Soenneker.Nws.HttpClients.Abstract;
using Soenneker.Nws.HttpClients.Registrars;
services.AddNwsOpenApiHttpClientAsSingleton();
INwsOpenApiHttpClient nws = serviceProvider
.GetRequiredService<INwsOpenApiHttpClient>();
HttpClient client = await nws.Get(cancellationToken);
Do not dispose the returned HttpClient; the registered provider owns it and removes it from the cache when disposed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Extensions.Configuration (>= 11.0.920)
- Soenneker.Utils.HttpClientCache (>= 11.0.2168)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Nws.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.Nws.OpenApiClientUtil
Provides a configured National Weather Service client and reuses it for the registered service lifetime. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.192 | 0 | 11/30/2026 |
| 11.0.191 | 0 | 11/30/2026 |
| 11.0.190 | 49 | 11/30/2026 |
| 11.0.189 | 49 | 11/29/2026 |
| 11.0.188 | 140 | 11/19/2026 |
| 11.0.187 | 103 | 11/19/2026 |
| 11.0.186 | 92 | 11/18/2026 |
| 11.0.185 | 109 | 11/18/2026 |
| 11.0.181 | 148 | 11/15/2026 |
| 11.0.180 | 114 | 11/15/2026 |
| 11.0.178 | 137 | 11/11/2026 |
| 11.0.177 | 101 | 11/11/2026 |
| 11.0.176 | 103 | 11/11/2026 |
| 11.0.175 | 116 | 11/11/2026 |
| 11.0.174 | 92 | 11/11/2026 |
| 11.0.173 | 151 | 11/3/2026 |
| 11.0.172 | 106 | 11/3/2026 |
| 11.0.171 | 106 | 11/3/2026 |
| 11.0.170 | 112 | 11/3/2026 |
| 11.0.169 | 185 | 10/27/2026 |
Update soenneker/nuget-resilient-publish action to v5 (#353)
Automatically merged