rally/generator/http_handler
HTTP RPC handler codegen.
Generates http_handler.gleam: handles POST /rpc requests for non-WebSocket clients. Decodes the request body through protocol_wire, dispatches to the RPC handler, and returns the response. When auth is configured, runs resolve/is_authenticated/authorize per request.
Values
pub fn generate(
endpoints: List(scanner.HandlerEndpoint),
rpc_dispatch_module: String,
auth_config: option.Option(types.AuthConfig),
contracts: List(#(types.ScannedRoute, types.PageContract)),
from_session_module from_session_module: String,
wire_import_module wire_import_module: String,
protocol protocol: String,
) -> String