ColinChang.ConsulRestHelper NuGet Package

This is a utility can help you to send web requests to services registered to Consul.Like RestTemplate in Spring Cloud for Java.

It has some functions below.
1.

Service discovery.

It can transfer virtual service request to a real instance service request.Like "http://ProductService/api/product/" => "http://192.168.1.10:8080/api/product/".

2. Load balancing

By default,we use the milliseconds elapsed since the system started to mocke up the total count of services registered to consul to get one of the service instance.

```csharp
services.ElementAt(Environment.TickCount % services.Count());
```

3.

Rest Request

sending Get/Post/Put/Delete web requests to services registered in consul.




Got any ColinChang.ConsulRestHelper Question?





Info

Version: 1.0.0
Author(s): ColinChang.ConsulRestHelper
Last Update: Thursday, May 30, 2019
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/colin-chang/ConsulRestHelper/tree/master
NuGet Url: https://www.nuget.org/packages/ColinChang.ConsulRestHelper


Install
Install-Package ColinChang.ConsulRestHelper
dotnet add package ColinChang.ConsulRestHelper
paket add ColinChang.ConsulRestHelper
ColinChang.ConsulRestHelper Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

.8

avg-downloads-per-day

0

days-since-last-release

1799