Skip to content

Instantly share code, notes, and snippets.

@ryancrum
Created January 28, 2011 21:59
Show Gist options
  • Save ryancrum/801082 to your computer and use it in GitHub Desktop.
Save ryancrum/801082 to your computer and use it in GitHub Desktop.
post-buffer
(defun post-buffer (arg)
(interactive "P")
(let ((url (if (or arg (not last-http-post-url))
(read-from-minibuffer "URL:" last-http-post-url)
last-http-post-url)))
(setq last-http-post-url url)
(http-post-body url (buffer-string) "text/plaintext" 'utf-8)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment