Closed ApocalyVec closed 6 months ago
If the server is non-HTTPS, you need to enforce HTTP/2. https://github.com/Cysharp/YetAnotherHttpHandler?tab=readme-ov-file#using-http2-over-cleartext-h2c
@mayuki Thank you! After forcing the handler to use Http2Only. Everything works now. Thank you so much for the quick response!
handler = new YetAnotherHttpHandler(){Http2Only = true}; // GRPC requires HTTP/2
Hi @mayuki
Many thanks for putting this together! It's incredible!
I'm trying to call python grpc calls from Unity. I was trying a bunch of things before I hit upon your repo which made things a lot easier. But I'm running into some problems using the HTTPHandler.
I followed the installation instructions with a fresh Unity project. I'm running into an issue with the following snippet:
The last line gives an HttpRequestException:
My python grpc server is the helloworld example from https://grpc.io/docs/languages/python/quickstart/ without any modification. The server I'm running is this file: https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py
Unity version: 2022.3.19f1 Python version: 3.11
Here's my Unity project, you can try it and reproduce the error: https://github.com/mengyuanwu1/GRPC-Test
Here's the full stack trace when the "unsupported HTTP version" is thrown from Unity side: