Soenneker.Nws.HttpClients 4.0.133

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Nws.HttpClients --version 4.0.133
                    
NuGet\Install-Package Soenneker.Nws.HttpClients -Version 4.0.133
                    
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="4.0.133" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Nws.HttpClients" Version="4.0.133" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Nws.HttpClients" />
                    
Project file
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 4.0.133
                    
#r "nuget: Soenneker.Nws.HttpClients, 4.0.133"
                    
#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@4.0.133
                    
#: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=4.0.133
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Nws.HttpClients&version=4.0.133
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
4.0.135 75 9/17/2026
4.0.134 55 9/16/2026
4.0.133 64 9/16/2026
4.0.132 58 9/16/2026
4.0.131 83 9/15/2026
4.0.130 117 9/13/2026
4.0.129 103 9/13/2026
4.0.128 109 9/13/2026
4.0.127 105 9/12/2026
4.0.126 110 9/12/2026
4.0.124 153 9/9/2026
4.0.123 109 9/9/2026
4.0.122 124 9/8/2026
4.0.121 134 9/8/2026
4.0.120 114 9/8/2026
4.0.119 126 9/7/2026
4.0.118 113 9/7/2026
4.0.117 115 9/7/2026
4.0.116 124 9/5/2026
4.0.115 97 9/5/2026
Loading failed