package dream-httpaf

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dream_httpaf_.ReqdSource

Sourcetype error = [
  1. | `Bad_request
  2. | `Bad_gateway
  3. | `Internal_server_error
  4. | `Exn of exn
]
Sourcetype error_handler = ?request:Request.t -> error -> (Headers.t -> Body.Writer.t) -> unit
Sourcemodule Reader = Parse.Reader
Sourcemodule Writer = Serialize.Writer
Sourcetype t = {
  1. request : Request.t;
  2. request_body : Body.Reader.t;
  3. reader : Reader.request;
  4. writer : Writer.t;
  5. response_body_buffer : Bigstringaf.t;
  6. error_handler : error_handler;
  7. mutable persistent : bool;
  8. mutable response_state : Response_state.t;
  9. mutable error_code : [ `Ok | error ];
}
Sourceval request : t -> Request.t
Sourceval request_body : t -> Body.Reader.t
Sourceval response : t -> Response.t option
Sourceval response_exn : t -> Response.t
Sourceval respond_with_string : t -> Response.t -> string -> unit
Sourceval respond_with_bigstring : t -> Response.t -> Bigstringaf.t -> unit
Sourceval unsafe_respond_with_streaming : flush_headers_immediately:bool -> t -> Response.t -> Body.Writer.t
Sourceval respond_with_streaming : ?flush_headers_immediately:bool -> t -> Response.t -> Body.Writer.t
Sourceval unsafe_respond_with_upgrade : t -> Headers.t -> (unit -> unit) -> unit
Sourceval respond_with_upgrade : t -> Headers.t -> (unit -> unit) -> unit
Sourceval report_error : t -> error -> unit
Sourceval report_exn : t -> exn -> unit
Sourceval try_with : t -> (unit -> 'a) -> (unit, exn) result
Sourceval close_request_body : t -> unit
Sourceval error_code : t -> [> `Bad_gateway | `Bad_request | `Exn of exn | `Internal_server_error ] option
Sourceval persistent_connection : t -> bool
Sourceval input_state : t -> Input_state.t
Sourceval output_state : t -> Output_state.t
Sourceval flush_request_body : t -> unit
Sourceval flush_response_body : t -> unit
OCaml

Innovation. Community. Security.