diff options
| author | Matias Goldfeld <[email protected]> | 2021-01-27 02:30:17 -0500 |
|---|---|---|
| committer | Matias Goldfeld <[email protected]> | 2021-01-27 02:30:17 -0500 |
| commit | 8563506d415d8d26f6d98442e08c55dc0e89e7ec (patch) | |
| tree | 1b5d11f28fea0415eb45f0ebc1186368691f6dad /lib/http/http.mli | |
| parent | Updated CI image from outdated ocaml/opam2 to ocaml/opam (diff) | |
| download | disml-8563506d415d8d26f6d98442e08c55dc0e89e7ec.tar.xz disml-8563506d415d8d26f6d98442e08c55dc0e89e7ec.zip | |
Fixed sending file attachments by adding multiform support
Diffstat (limited to 'lib/http/http.mli')
| -rw-r--r-- | lib/http/http.mli | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/http/http.mli b/lib/http/http.mli index b043854..3468272 100644 --- a/lib/http/http.mli +++ b/lib/http/http.mli @@ -6,8 +6,11 @@ module Base : sig val base_url : string
val process_url : string -> Uri.t
- val process_request_body : Yojson.Safe.t -> Cohttp_async.Body.t
- val process_request_headers : unit -> Cohttp.Header.t
+ val process_request_body :
+ ?files:(string * string) list ->
+ Yojson.Safe.t ->
+ Cohttp_async.Body.t
+ val process_request_headers : ?multipart:bool -> unit -> Cohttp.Header.t
val process_response :
string ->
@@ -15,6 +18,7 @@ module Base : sig Yojson.Safe.t Deferred.Or_error.t
val request :
+ ?files:(string * string) list ->
?body:Yojson.Safe.t ->
?query:(string * string) list ->
[ `Delete | `Get | `Patch | `Post | `Put ] ->
@@ -31,7 +35,7 @@ val delete_channel : int -> Channel_t.t Deferred.Or_error.t val get_messages : int -> int -> string * int -> Message_t.t list Deferred.Or_error.t
val get_message : int -> int -> Message_t.t Deferred.Or_error.t
val create_message :
- int -> Yojson.Safe.t -> Message_t.t Deferred.Or_error.t
+ ?files:(string * string) list -> int -> Yojson.Safe.t -> Message_t.t Deferred.Or_error.t
val create_reaction :
int -> int -> string -> unit Deferred.Or_error.t
val delete_own_reaction :
|