diff options
author | mousebot <mousebot@riseup.net> | 2021-10-20 15:10:12 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-10-20 15:10:12 +0200 |
commit | 636367b43d3f4ff1f6362a5e7e47016fc2a69d89 (patch) | |
tree | d2b538d10857ed0494baabfbf4466355b4889c03 /lisp/mastodon-http.el | |
parent | 7bcf78751c7e0f8ac6d5ad03be8e87e8ed30f9a3 (diff) | |
parent | e0cabe76d4107610c44b1bc6c570840ebadb5467 (diff) |
Merge branch 'img-previews' into develop
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 bc48e8d..052218c 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. |