package hyper

  1. Overview
  2. Docs

Module HyperSource

Sourcetype request = client message
Sourceand response = server message
Sourceand handler = request -> response promise
Sourceand 'a promise = 'a Lwt.t
Sourceval get : ?headers:(string * string) list -> ?redirect_limit:int -> ?server:handler -> string -> string promise
Sourceval post : ?headers:(string * string) list -> ?redirect_limit:int -> ?server:handler -> string -> string -> string promise
Sourcetype websocket
Sourceval websocket : ?redirect_limit:int -> ?server:handler -> string -> websocket promise
Sourceval send : ?text_or_binary:[ `Text | `Binary ] -> ?end_of_message:[ `End_of_message | `Continues ] -> websocket -> string -> unit promise
Sourceval receive : websocket -> string option promise
Sourceval receive_fragment : websocket -> (string * [ `Text | `Binary ] * [ `End_of_message | `Continues ]) option promise
Sourceval close_websocket : ?code:int -> websocket -> unit promise
Sourceval request : ?method_:[< method_ ] -> ?headers:(string * string) list -> ?body:stream -> string -> request
Sourceval body : 'a message -> string promise
Sourceval to_form_urlencoded : (string * string) list -> string