From bea5f6d3fd3347bd88e24a6c5a4dd56ca3c235b2 Mon Sep 17 00:00:00 2001 From: Spiros Eliopoulos Date: Thu, 19 Nov 2015 14:52:34 -0500 Subject: [PATCH] dispatch: update to new dispatch API --- lib/webmachine.ml | 4 ++-- lib/webmachine.mli | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/webmachine.ml b/lib/webmachine.ml index 8071a92..40b1cb3 100644 --- a/lib/webmachine.ml +++ b/lib/webmachine.ml @@ -144,12 +144,12 @@ module type S = sig (Code.status_code * Header.t * 'body * string list) IO.t val dispatch : - (unit -> 'body resource) Dispatch.route list -> + ((Dispatch.tag * string) list * Dispatch.typ * (unit -> 'body resource)) list -> body:'body -> request:Request.t -> (Code.status_code * Header.t * 'body * string list) option IO.t val dispatch' : - (unit -> 'body resource) Dispatch.DSL.route list -> + (string * (unit -> 'body resource)) list -> body:'body -> request:Request.t -> (Code.status_code * Header.t * 'body * string list) option IO.t end diff --git a/lib/webmachine.mli b/lib/webmachine.mli index 1c773b1..090bbb4 100644 --- a/lib/webmachine.mli +++ b/lib/webmachine.mli @@ -156,7 +156,7 @@ module type S = sig is useful for debugging. *) val dispatch : - (unit -> 'body resource) Dispatch.route list -> + ((Dispatch.tag * string) list * Dispatch.typ * (unit -> 'body resource)) list -> body:'body -> request:Request.t -> (Code.status_code * Header.t * 'body * string list) option IO.t (** [dispatch routes] returns a request handler that will iterate through @@ -179,7 +179,7 @@ module type S = sig *) val dispatch' : - (unit -> 'body resource) Dispatch.DSL.route list -> + (string * (unit -> 'body resource)) list -> body:'body -> request:Request.t -> (Code.status_code * Header.t * 'body * string list) option IO.t (** [dispatch' routes ~body ~request] works in the same way as {dispatch'}