type alias RpcFetchHandler
Since 0.3.0

A fetch handler that attempts to handle a gRPC/Connect request. Returns a Response if the request was handled as RPC, otherwise returns null so the adapter falls through to normal Hono handling.

Retained only for the deprecated IHttpAdapter.setRpcHandler seam, which no adapter consults. Since M70a gRPC is dispatched from the kernel's terminal handler, after the middleware pipeline has run and before route matching: the kernel resolves IGrpcService, asks claims() whether the path belongs to gRPC, and calls handleRequest directly with a Request rebuilt from the already-mapped body.

Historically the adapter consulted a handler of this shape before mapping the request, which is why the contract required one returning null to leave the body unread. Nothing calls it on that path any more.

Definition

(request: Request) => Promise<Response | null>

Usage

import { type RpcFetchHandler } from "common/src/index.ts";