emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/srht e17edd7643 04/27: Add README.


From: ELPA Syncer
Subject: [elpa] externals/srht e17edd7643 04/27: Add README.
Date: Tue, 17 May 2022 22:57:59 -0400 (EDT)

branch: externals/srht
commit e17edd764338a366abe0b2f78e34afd39e919d84
Author: Aleksandr Vityazev <avityazev@posteo.org>
Commit: Aleksandr Vityazev <avityazev@posteo.org>

    Add README.
    
    * srht: Add comments. (srht--api-request): Fix.
---
 README.md  | 8 ++++++++
 README.org | 5 +++++
 srht.el    | 5 +++--
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..f75466b07e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+
+
+### Version 0.1.0
+
+
+# About
+
+GNU Emacs [sourcehut](https://sr.ht) API client.
diff --git a/README.org b/README.org
new file mode 100644
index 0000000000..c5585fda0c
--- /dev/null
+++ b/README.org
@@ -0,0 +1,5 @@
+#+OPTIONS: toc:nil
+*** Version 0.1.0
+
+* About
+GNU Emacs [[https://sr.ht][sourcehut]] API client.
diff --git a/srht.el b/srht.el
index 2748826a00..c27309a97a 100644
--- a/srht.el
+++ b/srht.el
@@ -23,7 +23,7 @@
 ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-;; comment
+;; https://man.sr.ht/api-conventions.md
 ;;
 
 ;;; Code:
@@ -95,6 +95,7 @@ narrowed to the response body."
         (json-array-type 'list))
     (json-read)))
 
+;; TODO add body-type to use with `multipart/from-data'
 (cl-defun srht--api-request (method &key service path query
                                     body (else #'srht--else)
                                     form (then 'sync) (as #'srht--as)
@@ -119,7 +120,7 @@ THEN is a callback function, which is called in the 
response data.
 ELSE is an optional callback function called when the request
 fails with one argument, a `plz-error' struct."
   (let ((uri (srht--make-uri service path query))
-        (content-type (if form "multipart-form-data" "application/json")))
+        (content-type (if form "multipart/form-data" "application/json")))
     (plz method uri
       :headers `(,(cons "Content-Type" content-type)
                  ,(cons "Authorization" (concat "token " srht-token)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]