mynalabsai / grpc_gateway_media_example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gRPC-gateway for mediafiles

Example of service thar provides both HTTP API and gRPC, common logic wrapper, and allows using mediafiles.

Usage

Run

go run main.go

Check plain request

curl localhost:8080/v1/echo  -H "Content-Type: applicaton/json" -d@request_plain.json

Use macros in request

curl localhost:8080/v1/echo  -H "Content-Type: multipart/form-data" -F 'data=@request_macros.json' -F '$neiro=@Neiro.png'

You can also send gRPC requests to localhost:9090. We use grpcurl.

grpcurl --plaintext -d @ localhost:9090  echoproto.EchoService.Echo < request_plain.json

About


Languages

Language:Go 79.9%Language:Starlark 20.1%