Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active December 30, 2019 10:23
Show Gist options
  • Save gistlyn/c2c6bd688577471f878185b7455a8c94 to your computer and use it in GitHub Desktop.
Save gistlyn/c2c6bd688577471f878185b7455a8c94 to your computer and use it in GitHub Desktop.
Dart Google protoc insecure GrpcServicesClient TodoWorld Example
import 'dart:io';
import 'package:grpc/grpc.dart';
import 'package:TodoWorld/services.pb.dart';
import 'package:TodoWorld/services.pbgrpc.dart';
void main(List<String> args) async {
var client = GrpcServicesClient(ClientChannel('todoworld.servicestack.net', port:5054,
options:ChannelOptions(credentials: ChannelCredentials.insecure())));
var response = await client.getHello(Hello()..name = 'gRPC Dart');
print(response.result);
exit(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment