Skip to content

Instantly share code, notes, and snippets.

@gistlyn gistlyn/Program.cs
Created Dec 28, 2019

Embed
What would you like to do?
Insecure C# gRPC Generic ServiceClient TodoWorld Example
using System;
using System.Threading.Tasks;
using ServiceStack;
using TodoWorld.ServiceModel;
namespace TodoWorld
{
class Program
{
public static async Task Main(string[] args)
{
ProtoBuf.Grpc.Client.GrpcClientFactory.AllowUnencryptedHttp2 = true;
var client = new GrpcServiceClient("http://todoworld.servicestack.net:5054");
var response = await client.GetAsync(new Hello { Name = "gRPC C#" });
Console.WriteLine(response.Result);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.