package dream-httpaf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Reader = Parse.Reader
module Writer = Serialize.Writer
type request_handler = Reqd.t -> unit
type error = [
  1. | `Bad_gateway
  2. | `Bad_request
  3. | `Internal_server_error
  4. | `Exn of exn
]
type error_handler = ?request:Request.t -> error -> (Headers.t -> Body.Writer.t) -> unit
type error_code =
  1. | No_error
  2. | Error of {
    1. request : Request.t option;
    2. mutable response_state : Response_state.t;
    }
type t = {
  1. reader : Reader.request;
  2. writer : Writer.t;
  3. response_body_buffer : Bigstringaf.t;
  4. request_handler : request_handler;
  5. error_handler : error_handler;
  6. request_queue : Reqd.t Stdlib.Queue.t;
  7. mutable error_code : error_code;
}
val is_closed : t -> bool
val is_active : t -> bool
val current_reqd_exn : t -> Reqd.t
val yield_reader : t -> (unit -> unit) -> unit
val wakeup_reader : t -> unit
val yield_writer : t -> (unit -> unit) -> unit
val wakeup_writer : t -> unit
val default_error_handler : ?request:'a -> [< `Bad_gateway | `Bad_request | `Conflict | `Enhance_your_calm | `Exn of exn | `Expectation_failed | `Forbidden | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Network_authentication_required | `Not_acceptable | `Not_found | `Not_implemented | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Service_unavailable | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long ] -> (Headers.t -> Body.Writer.t) -> unit
val create : ?config:Config.t -> ?error_handler:Reqd.error_handler -> request_handler -> t
val shutdown_reader : t -> unit
val shutdown_writer : t -> unit
val error_code : t -> [> `Bad_gateway | `Bad_request | `Exn of exn | `Internal_server_error ] option
val shutdown : t -> unit
val set_error_and_handle : ?request:Request.t -> t -> Reqd.error -> unit
val report_exn : t -> exn -> unit
val advance_request_queue : t -> unit
val _next_read_operation : t -> [> `Close | `Error of Reader.request_error | `Read | `Start | `Yield ]
val _final_read_operation_for : t -> Reqd.t -> [> `Close | `Error of Reader.request_error | `Read | `Start | `Yield ]
val next_read_operation : t -> [> `Close | `Read | `Yield ]
val read_with_more : t -> Bigstringaf.t -> off:int -> len:int -> Reader.AU.more -> int
val read : t -> Bigstringaf.t -> off:int -> len:int -> int
val read_eof : t -> Bigstringaf.t -> off:int -> len:int -> int
val flush_response_error_body : Response_state.t -> unit
val _next_write_operation : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val _final_write_operation_for : t -> Reqd.t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val next_write_operation : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val report_write_result : t -> [< `Closed | `Ok of int ] -> unit
OCaml

Innovation. Community. Security.