Example of service thar provides both HTTP API and gRPC, common logic wrapper, and allows using mediafiles.
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 '[email protected]'
You can also send gRPC requests to localhost:9090
. We use grpcurl.
grpcurl --plaintext -d @ localhost:9090 echoproto.EchoService.Echo < request_plain.json