ColinChang.ConsulRestHelper
1.0.0
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.
Install-Package ColinChang.ConsulRestHelper -Version 1.0.0
dotnet add package ColinChang.ConsulRestHelper --version 1.0.0
<PackageReference Include="ColinChang.ConsulRestHelper" Version="1.0.0" />
paket add ColinChang.ConsulRestHelper --version 1.0.0
#r "nuget: ColinChang.ConsulRestHelper, 1.0.0"
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.
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/".
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.
services.ElementAt(Environment.TickCount % services.Count());
Rest Request
sending Get/Post/Put/Delete web requests to services registered in consul.
Documents
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.
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/".
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.
services.ElementAt(Environment.TickCount % services.Count());
Rest Request
sending Get/Post/Put/Delete web requests to services registered in consul.
Documents
Dependencies
-
.NETStandard 2.0
- Consul (>= 0.7.2.6)
- Newtonsoft.Json (>= 12.0.2)
Used By
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version History
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 396 | 5/30/2019 |