Writing RESTful APIs Using gRPC-Gateway
summary
gRPC-Gateway generates a reverse proxy that transcodes JSON HTTP requests to gRPC calls and back, demonstrated by a Go Hello World service with gRPC on port 50051 and an HTTP gateway on port 8800. The demo uses buf to generate code, imports google/api/annotations.proto, maps RPC methods to endpoints like post /v1/hello via inline annotations or external YAML, supports multiple HTTP bindings for one RPC, auto-generates OpenAPI docs, translates gRPC status codes to HTTP, and exposes server streaming as NDJSON streaming.
AI-written summary · about
chapters (15)
- 0:00gRPC-Gateway intro
- 1:06What is gRPC-Gateway
- 3:37gRPC-Gateway request lifecycle
- 5:42Configuring HTTP mappings
- 7:30Inline REST annotations
- 9:13Multiple HTTP bindings
- 10:40Demo: Hello World service
- 13:50Code generation with protoc/buf
- 14:55Running gRPC + REST servers
- 17:04Advanced gRPC-Gateway features
- 17:26Custom HTTP method/path mapping
- 18:30Streaming support
- 20:40Error handling in gRPC/REST
- 22:06Key takeaways
- 23:12Resources & contributions








