GRPC:修订间差异

来自WHY42
(创建页面,内容为“= gRPC vs HTTP = {| class="wikitable" |- ! Feature !! gRPC !! HTTP APIs with JSON |- | Contract || Required (.proto) || Optional (OpenAPI) |- | Protocol || HTTP/2 || HTTP |- | Payload || Protobuf (small, binary) || JSON (large, human readable) |- | Prescriptiveness || Strict specification || Loose. Any HTTP is valid. |- | Streaming || Client, server, bi-directional || Client, server |- | Browser support || No (requires gr…”)
 
 
第21行: 第21行:
|}  
|}  


<ref>https://learn.microsoft.com/en-us/aspnet/core/grpc/comparison?view=aspnetcore-8.0</ref>


[[Category:HTTP]]
[[Category:HTTP]]

2024年1月18日 (四) 01:59的最新版本

gRPC vs HTTP

Feature gRPC HTTP APIs with JSON
Contract Required (.proto) Optional (OpenAPI)
Protocol HTTP/2 HTTP
Payload Protobuf (small, binary) JSON (large, human readable)
Prescriptiveness Strict specification Loose. Any HTTP is valid.
Streaming Client, server, bi-directional Client, server
Browser support No (requires grpc-web) Yes
Security Transport (TLS) Transport (TLS)
Client code-generation Yes OpenAPI + third-party tooling

[1]