diff options
author | mousebot <mousebot@riseup.net> | 2021-10-21 19:00:14 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-10-21 19:00:14 +0200 |
commit | 45390f6ad1923814a3ac28fc456fd264a8b8cd1e (patch) | |
tree | dce1710bc3597750a03e87baf4461b8ca22319c5 /lisp/mastodon-http.el | |
parent | 2329c3a7fc7ab4beb8caaeaedfa2b17ea4cf1db2 (diff) |
restore hdurer's http--read-file-as-string
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r-- | lisp/mastodon-http.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index fbcf855..6df2aab 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -113,6 +113,12 @@ Authorization header is included by default unless UNAUTHENTICED-P is non-nil." (url-retrieve-synchronously url) (url-retrieve-synchronously url nil nil mastodon-http--timeout))))) +(defun mastodon-http--read-file-as-string (filename) + "" + (with-temp-buffer + (insert-file-contents filename) + (string-to-unibyte (buffer-string)))) + (defun mastodon-http--get (url) "Make synchronous GET request to URL. |