gRPC-Web

The same schema in a browser, without running a proxy.

Endpoint

Browser clients get the same protobuf schema and the same services, with no Envoy proxy to operate. Streaming methods work; the transport falls back to server-streaming over HTTP/2 where the browser requires it.

import { createGrpcWebTransport } from "@connectrpc/connect-web";import { createClient } from "@connectrpc/connect";import { Tape } from "@robinhoodrpc/grpc/tape_connect"; const transport = createGrpcWebTransport({  baseUrl: "https://grpc-web.robinhoodrpc.io",  interceptors: [(next) => async (req) => {    req.header.set("authorization", `Bearer ${KEY}`);    return next(req);  }],}); for await (const print of createClient(Tape, transport).streamTape({  tokenSymbols: ["AAPL"],})) {  render(print);}

Correctness

Correctness note

Never ship a production API key to a browser. Use a scoped, rate-limited key issued for client-side use, or proxy through your own backend — the same advice applies to every provider, but gRPC-Web makes it easy to forget.

Related