branch: elpa/hyperdrive
commit 36b0293cdd879fbea664e491f082a194c52e802e
Author: Joseph Turner <jos...@ushin.org>
Commit: Joseph Turner <jos...@ushin.org>

    Change: (h/write) Use he/api
---
 hyperdrive-lib.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index dcc20c6fcb..7171cb59a5 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1038,9 +1038,14 @@ Call ELSE if request fails."
     :else else))
 
 (cl-defun h/write (entry &key body then else queue)
-  "Write BODY to hyperdrive ENTRY's URL."
+  "Write BODY to hyperdrive ENTRY's URL.
+THEN and ELSE are passed to `hyperdrive-entry-api', which see."
   (declare (indent defun))
-  (h//write (he/url entry)
+  (he/api 'put entry
+    ;; TODO: Investigate whether we should use 'text body type for text 
buffers.
+    :body-type 'binary
+    ;; TODO: plz accepts buffer as a body, we should refactor calls to h/write
+    ;; to pass in a buffer instead of a buffer-string.
     :body body :then then :else else :queue queue))
 
 (cl-defun h//format-entry-url

Reply via email to