grpc-json-proxy icon indicating copy to clipboard operation
grpc-json-proxy copied to clipboard

[question] unable to do request http2: unsupported scheme

Open boris-lapouga opened this issue 4 years ago • 3 comments

Greetings,

This is just a question, not a "request" for a solution.

I followed the guidelines to setup Postman (7.26.0) proxy and ran docker grpc-json-proxy, when trying to send a simple message I get this error:

2020/07/01 10:43:11 unable to do request err=[Post http://localhost:50051/notes.NoteService/List: http2: unsupported scheme]

I was wondering if the http/2 support is not implemented in your library or gRPC calls would generally not work over http/2 carrier?

It seems like you were writing that documentation before Postman defaulted to http/2 requests with no ability to specify protocol version for the requests.

Thank you

boris-lapouga avatar Jul 01 '20 10:07 boris-lapouga

Do you have any more information on Postman directly supporting http/2? I'm using Postman (7.27.1) on MacOS and it doesn't appear to support http/2 yet.

Separately, can you export your Postman request as a Curl command and post it here? You may be missing a header in Postman to signal the proxy to modify the request. The log line above the one you posted may have additional relevant information.

jnewmano avatar Jul 01 '20 18:07 jnewmano

@jnewmano Sorry it took me a while to respond.

I did follow the instructions from README to run docker container and proxy a request to it, this would be the cURL command: curl --location --request POST 'http://localhost:60055/join.geo/Places/List' \ --header 'Content-Type: application/grpc+json'

This would be the output of the proxy container: 2020/07/06 15:21:03 proxying request url=[http://localhost:60055/join.geo/Places/List] isJSONGRPC=[true] 2020/07/06 15:21:03 unable to do request err=[Post http://localhost:60055/join.geo/Places/List: http2: unsupported scheme]

There's really nothing extra going on, just wanted to have basics up and running.

As for http/2, seems like it really is not supported yet by Postman, but then I'm puzzled what responds to me with that message. 🤔

I'll appreciate any help.

boris-lapouga avatar Jul 06 '20 15:07 boris-lapouga

I also has the same issue. It work when I add a Grpc-Insecure header set to true. Maybe this can help you.

abin1989 avatar Jul 29 '20 15:07 abin1989