Created
August 25, 2012 12:34
-
-
Save wallyqs/3464946 to your computer and use it in GitHub Desktop.
Simple request from emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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