Skip to content

Commit

Permalink
Call Https and ignore Certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackclaws committed Nov 24, 2021
1 parent 5b68830 commit cb17700
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mean-monsters-minimal/Assets/src/ClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ public class ClientTest : MonoBehaviour
void Start()
{

var webHandler = new GrpcWebHandler(new HttpClientHandler());
var webHandler = new GrpcWebHandler(new HttpClientHandler()
{
ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) => true
});
var option = new GrpcChannelOptions
{
Credentials = ChannelCredentials.Insecure,
HttpHandler = webHandler,
};
var channel = GrpcChannel.ForAddress("http://127.0.0.1:9091", option);
var channel = GrpcChannel.ForAddress("https://127.0.0.1:9091", option);
var client = new GameService.GameServiceClient(channel);
FullMonsterStateResponse reply = client.getMatchResult(new GetMatchResultRequest
{
Expand Down

0 comments on commit cb17700

Please sign in to comment.