Skip to content

Instantly share code, notes, and snippets.

@wallyqs
Created August 25, 2012 12:34
Show Gist options
  • Save wallyqs/3464946 to your computer and use it in GitHub Desktop.
Save wallyqs/3464946 to your computer and use it in GitHub Desktop.
Simple request from emacs
(let* ((url-request-method "POST")
(url-request-extra-headers '(("Content-Type" . "application/json")))
(url-request-data
(encode-coding-string (concat "{"
"\"content\": \"* HELLO WORLD\""
"}"
) 'utf-8)
)
) ;end of let varlist
(url-retrieve "http://127.0.0.1:9393/api/text.json"
'(lambda (status)
(switch-to-buffer (current-buffer))
))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment