49 / 65 · 14 API Testing Fundamentals · gRPC Fundamentals← prev⊞ allnext →☰ Read as one page
7.2How gRPC Differs from REST
| Aspect | REST | gRPC |
|---|---|---|
| Protocol | HTTP/1.1 or HTTP/2 | HTTP/2 only |
| Data format | JSON (text) | Protocol Buffers (binary) |
| Schema | Optional (OpenAPI) | Required (.proto files) |
| Code generation | Optional | Built-in (generates client/server code) |
| Streaming | Not native | Native (server, client, bidirectional) |
| Browser support | Native | Requires gRPC-Web proxy |
| Error codes | HTTP status codes | gRPC status codes (own system) |