diff --git a/examples/echo.ml b/examples/echo.ml index af133187..48c3b791 100644 --- a/examples/echo.ml +++ b/examples/echo.ml @@ -244,6 +244,11 @@ let () = Route.(exact "alice" @/ return) (fun _req -> Response.make_string (Ok alice_text)); + Server.add_route_handler ~meth:`HEAD server + Route.(exact "head" @/ return) + (fun _req -> + Response.make_void ~code:200 ~headers:[ "x-hello", "world" ] ()); + (* VFS *) Tiny_httpd.Dir.add_vfs server ~config: