ExternalEndpoint.Aspire.Hosting 1.1.0

dotnet add package ExternalEndpoint.Aspire.Hosting --version 1.1.0                
NuGet\Install-Package ExternalEndpoint.Aspire.Hosting -Version 1.1.0                
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="ExternalEndpoint.Aspire.Hosting" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ExternalEndpoint.Aspire.Hosting --version 1.1.0                
#r "nuget: ExternalEndpoint.Aspire.Hosting, 1.1.0"                
#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.
// Install ExternalEndpoint.Aspire.Hosting as a Cake Addin
#addin nuget:?package=ExternalEndpoint.Aspire.Hosting&version=1.1.0

// Install ExternalEndpoint.Aspire.Hosting as a Cake Tool
#tool nuget:?package=ExternalEndpoint.Aspire.Hosting&version=1.1.0                

Aspire.Hosting.ExternalEndpoint

Adds the possibility to add external endpoints as resources which can be easily referenced.

Overview

An external endpoint is just a URL which is reachable from wherever you are running your application. This can be a URL to a REST API, a website, a file, etc. The idea is to have a single place where you can define these URLs and then reference them in your code. This way, if the URL changes, you only have to update it in one place.

Usage

The external endpoint takes part in service discovery, so any HttpClient can simply reference the external endpoint by name just as if you would reference another project. Alternatively, you can use the ServiceEndpointResolver from Microsoft.Extensions.ServiceDiscovery to get the URL in your MyApplication if you do not want to use HttpClient.

var externalApi = builder.AddExternalEndpoint("ExternalApi", "https://api.example.com");

var myProject = builder.addProject<MyApplication>("MyApplication")
	.WithReference(externalApi);

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 155 7/22/2024
1.0.1 103 7/19/2024
1.0.0 95 7/19/2024