We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 431eda2 commit 3c7d965Copy full SHA for 3c7d965
src/helix/Helix.mli
@@ -141,6 +141,7 @@ module Http : sig
141
module Encoder : sig
142
type 'a t
143
144
+ val make : ?content_type:string -> ('a -> Stdweb.Fetch.Body.t) -> 'a t
145
val empty : unit t
146
val text : string t
147
val form_data : Stdweb.Form_data.t t
src/helix/Http.ml
@@ -20,6 +20,8 @@ type body = Stdweb.Fetch.Body.t
20
module Encoder = struct
21
type 'a t = string option * ('a -> Fetch.Body.t)
22
23
+ let make ?(content_type) f = content_type, f
24
+
25
let to_undefined_body _ = Fetch.Body.unsafe_of_js Jx.undefined
26
let empty = (None, to_undefined_body)
27
let ignore = (None, to_undefined_body)
0 commit comments