grpc-ecosystem/grpc-gateway
A `protoc` plugin that generates a reverse-proxy server to translate RESTful HTTP/JSON requests into gRPC, allowing gRPC services to expose both gRPC and REST APIs simultaneously.
Core Features
Quick Start
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gatewayDetailed Introduction
gRPC-Gateway is a powerful `protoc` plugin designed to bridge the gap between high-performance gRPC services and traditional RESTful HTTP/JSON APIs. While gRPC offers efficiency and strong typing, many scenarios still require a REST interface for broader client compatibility, backward compatibility, or integration with existing tooling. This project automatically generates a reverse-proxy server that translates incoming RESTful HTTP requests into gRPC calls, based on `google.api.http` annotations in your protobuf service definitions. This allows developers to maintain a single source of truth for their API while serving both gRPC and REST clients seamlessly.