From 20ebbef7229b56dde6035969af8e766c494bdadd Mon Sep 17 00:00:00 2001 From: swrup Date: Sun, 19 Oct 2025 14:36:08 +0200 Subject: [PATCH] --- src/mte.ml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/mte.ml b/src/mte.ml index d4b4a2e2..0f9e05cc 100644 --- a/src/mte.ml +++ b/src/mte.ml @@ -40,6 +40,11 @@ module Respond_with = struct let* () = with_string ?compression:None req body in let* () = add ~field:"accept" Headers.accept_header_value in respond `Unsupported_media_type + + let not_implemented ?hint req = + let body = error_detail ?hint `Not_implemented in + let* () = with_string ?compression:None req body in + respond `Not_implemented end (* TODO check for mathcing ETAG with a middleware instead? *) @@ -105,6 +110,15 @@ let hello req _server _env = let* () = add ~field:"content-type" "text/plain" in respond `OK + +let not_implemented_routes = + let f req _server _env = + Respond_with.not_implemented ~hint:"this route is not implemented" req + in + let open Vif.Uri in + let open Vif.Route in + [] + let routes = let open Vif.Uri in let open Vif.Route in