This commit is contained in:
parent
aa2ff7b2f0
commit
20ebbef722
1 changed files with 14 additions and 0 deletions
14
src/mte.ml
14
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue