dream_mock_server/controllers/config_controller
config_controller.gleam - Config-mode request handler
When the mock server is started with a config list, all requests are handled by this controller. It looks up the first matching route by path (exact or prefix) and optional method, and returns that route’s status and body. If no route matches, returns 404.
Values
pub fn handle(
request: request.Request,
context: config.MockConfigContext,
services: router.EmptyServices,
) -> response.Response
Handle a request by finding the first matching route in the config. First match wins (list order). No match returns 404.