Soenneker.Nws.HttpClients
11.0.185
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.Nws.HttpClients --version 11.0.185
NuGet\Install-Package Soenneker.Nws.HttpClients -Version 11.0.185
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Nws.HttpClients" Version="11.0.185" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Nws.HttpClients" Version="11.0.185" />
<PackageReference Include="Soenneker.Nws.HttpClients" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Nws.HttpClients --version 11.0.185
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Nws.HttpClients, 11.0.185"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Nws.HttpClients@11.0.185
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Nws.HttpClients&version=11.0.185
#tool nuget:?package=Soenneker.Nws.HttpClients&version=11.0.185
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net11.0
- Soenneker.Extensions.Configuration (>= 11.0.919)
- Soenneker.Utils.HttpClientCache (>= 11.0.2161)
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.188 | 58 | 11/19/2026 |
| 11.0.187 | 51 | 11/19/2026 |
| 11.0.186 | 45 | 11/18/2026 |
| 11.0.185 | 55 | 11/18/2026 |
| 11.0.181 | 128 | 11/15/2026 |
| 11.0.180 | 102 | 11/15/2026 |
| 11.0.178 | 128 | 11/11/2026 |
| 11.0.177 | 94 | 11/11/2026 |
| 11.0.176 | 99 | 11/11/2026 |
| 11.0.175 | 109 | 11/11/2026 |
| 11.0.174 | 85 | 11/11/2026 |
| 11.0.173 | 146 | 11/3/2026 |
| 11.0.172 | 101 | 11/3/2026 |
| 11.0.171 | 100 | 11/3/2026 |
| 11.0.170 | 105 | 11/3/2026 |
| 11.0.169 | 179 | 10/27/2026 |
| 11.0.168 | 122 | 10/27/2026 |
| 11.0.167 | 107 | 10/26/2026 |
| 11.0.166 | 98 | 10/26/2026 |
| 11.0.165 | 138 | 10/26/2026 |
Loading failed
Updated Soenneker.Utils.HttpClientCache to 11.0.2161