aboutsummaryrefslogtreecommitdiff
path: root/lib/http
diff options
context:
space:
mode:
authorMatias Goldfeld <[email protected]>2021-01-27 17:15:05 -0500
committerMatias Goldfeld <[email protected]>2021-01-27 17:15:05 -0500
commit8fc7e259c365c6a84b216b7548b87bc2a96d6868 (patch)
tree5ea4f7d6ff82727d62b01fb2d234a4f8ab66aa2b /lib/http
parentFixed sending file attachments by adding multiform support (diff)
downloaddisml-8fc7e259c365c6a84b216b7548b87bc2a96d6868.tar.xz
disml-8fc7e259c365c6a84b216b7548b87bc2a96d6868.zip
Added message_reference functionality
Diffstat (limited to 'lib/http')
-rw-r--r--lib/http/http.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/http/http.ml b/lib/http/http.ml
index 3bcf04e..ec6cb2c 100644
--- a/lib/http/http.ml
+++ b/lib/http/http.ml
@@ -21,12 +21,12 @@ module Base = struct
else
let boundary = "--" ^ multipart_boundary in
let add_file (acc, idx) (filename, file_contents) =
- Printf.sprintf "%s\nContent-Disposition: form-data; name=\"file%i\"; filename=\"%s\"\n\n%s\n%s"
- acc idx filename file_contents boundary, idx + 1
+ sprintf "%s\nContent-Disposition: form-data; name=\"file%i\"; filename=\"%s\"\n\n%s\n%s"
+ acc idx filename file_contents boundary, idx + 1
in
let file_data, _ = List.fold files ~init:("", 1) ~f:add_file in
- Printf.sprintf "%s\nContent-Disposition: form-data; name=\"payload_json\"\n\n%s\n%s%s--"
- boundary json boundary file_data
+ sprintf "%s\nContent-Disposition: form-data; name=\"payload_json\"\n\n%s\n%s%s--"
+ boundary json boundary file_data
end |> Cohttp_async.Body.of_string
let process_request_headers ?(multipart=false) () =