Skip to main content

Module grpc_web

Module grpc_web 

Source
Expand description

gRPC-web to gRPC: GrpcWebLayer lets browsers (which can’t read HTTP trailers or send HTTP/2 frames of their own) call gRPC services, as Envoy’s grpc_web filter does.

A request with Content-Type: application/grpc-web[+proto] or application/grpc-web-text[+proto] (base64) is passed on as application/grpc[+proto] with te: trailers and its body decoded; the response comes back as gRPC-web, the gRPC status and other trailers appended to the body as the final frame (flag 0x80), base64-encoded for -text. Bodies stream both ways. Other requests pass through untouched.

Structs§

GrpcWebLayer
Translates gRPC-web requests to gRPC for the layers after it — put it in front of a GrpcProxy: