AspNetCore.Proxy 1.2.2

Package Description

There is a newer version of this package available.
See the version list below for details.
Install-Package AspNetCore.Proxy -Version 1.2.2
dotnet add package AspNetCore.Proxy --version 1.2.2
<PackageReference Include="AspNetCore.Proxy" Version="1.2.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AspNetCore.Proxy --version 1.2.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AspNetCore.Proxy, 1.2.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install AspNetCore.Proxy as a Cake Addin
#addin nuget:?package=AspNetCore.Proxy&version=1.2.2

// Install AspNetCore.Proxy as a Cake Tool
#tool nuget:?package=AspNetCore.Proxy&version=1.2.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

AspNetCore.Proxy

ASP.NET Core Proxies made easy.

Information

Install

dotnet add package AspNetCore.Proxy

Test

Download the source and run.

dotnet restore
dotnet test src/Test/AspNetCore.Proxy.Tests.csproj

Compatibility

Latest .NET Standard 2.0.

Examples

There are two main ways to use this library to proxy calls.

You can define a map and a proxy.

app.UseProxy("api/{arg1}/{arg2}", async (args) => {
    // Get the proxied address.
    return await SomeCallThatComputesAUrl(args["arg1"], args["arg2"]);
});

However, you can also make the proxy look and feel almost like a route.

In your Configure(IApplicationBuilder, IHostingEnvironment) method, add the middleware.

app.UseProxies();

Then, create a static method which returns a Task<string> (where the string is the proxied URI).

[ProxyRoute("api/{arg1}/{arg2}")]
public static async Task<string> GetProxy(string arg1, string arg2)
{
    // Get the proxied address.
    return await SomeCallThatComputesAUrl(arg1, arg2);
}

License

The MIT License (MIT)

Copyright (c) 2017 Aaron Roney

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

AspNetCore.Proxy

ASP.NET Core Proxies made easy.

Information

Install

dotnet add package AspNetCore.Proxy

Test

Download the source and run.

dotnet restore
dotnet test src/Test/AspNetCore.Proxy.Tests.csproj

Compatibility

Latest .NET Standard 2.0.

Examples

There are two main ways to use this library to proxy calls.

You can define a map and a proxy.

app.UseProxy("api/{arg1}/{arg2}", async (args) => {
    // Get the proxied address.
    return await SomeCallThatComputesAUrl(args["arg1"], args["arg2"]);
});

However, you can also make the proxy look and feel almost like a route.

In your Configure(IApplicationBuilder, IHostingEnvironment) method, add the middleware.

app.UseProxies();

Then, create a static method which returns a Task<string> (where the string is the proxied URI).

[ProxyRoute("api/{arg1}/{arg2}")]
public static async Task<string> GetProxy(string arg1, string arg2)
{
    // Get the proxied address.
    return await SomeCallThatComputesAUrl(arg1, arg2);
}

License

The MIT License (MIT)

Copyright (c) 2017 Aaron Roney

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on AspNetCore.Proxy:

Package Downloads
FenixAlliance.ACL.Dependencies
Application Component for the Alliance Business Suite.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
4.2.0 23,048 4/13/2021
4.1.0 157,755 8/6/2020
4.0.1 87,736 3/16/2020
4.0.0 1,583 2/28/2020
4.0.0-alpha 246 2/28/2020
3.1.1 14,812 11/14/2019
3.1.0 1,988 10/9/2019
3.0.1 24,345 9/5/2019
2.1.2 8,044 6/15/2019
2.1.1 2,780 4/22/2019
2.1.0 406 4/15/2019
2.0.0 1,379 3/17/2019
1.4.1 4,668 3/16/2019
1.3.0 5,620 1/2/2019
1.2.2 5,946 10/24/2017
1.2.1 558 10/17/2017
1.2.0 533 10/17/2017
1.1.3 555 10/6/2017
1.1.0 544 10/6/2017
1.0.5 551 10/6/2017
1.0.4 564 10/6/2017
1.0.3 546 10/6/2017
1.0.2 539 10/5/2017
1.0.1 543 10/5/2017
1.0.0 627 10/5/2017
Show less