Last active
December 30, 2019 10:23
-
-
Save gistlyn/c2c6bd688577471f878185b7455a8c94 to your computer and use it in GitHub Desktop.
Dart Google protoc insecure GrpcServicesClient TodoWorld Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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