From 45390f6ad1923814a3ac28fc456fd264a8b8cd1e Mon Sep 17 00:00:00 2001 From: mousebot Date: Thu, 21 Oct 2021 19:00:14 +0200 Subject: restore hdurer's http--read-file-as-string --- lisp/mastodon-http.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp') 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. -- cgit v1.2.3