Module Httpcats_core.Server

type error = [
  1. | `V1 of H1.Server_connection.error
  2. | `V2 of H2.Server_connection.error
  3. | `Protocol of string
]
type request = {
  1. meth : Method.t;
  2. target : string;
  3. scheme : string;
  4. headers : Headers.t;
}
type response = {
  1. status : Status.t;
  2. headers : Headers.t;
}
type body = [
  1. | `V1 of H1.Body.Writer.t
  2. | `V2 of H2.Body.Writer.t
]
type reqd = [
  1. | `V1 of H1.Reqd.t
  2. | `V2 of H2.Reqd.t
]
type error_handler = [ `V1 | `V2 ] -> ?request:request -> error -> (Headers.t -> body) -> unit
type 'a handler = 'a -> reqd -> unit