; synchronously    
(defun get-url (url)
  (with-current-buffer (url-retrieve-synchronously url) (buffer-string)))

(print (get-url "http://www.gnu.org"))

; asynchronously    
(defun print-url (url)
  (url-retrieve url (lambda (a) (print a))))

(print-url "http://www.gnu.org")


 

References

Retrieving URLs | http://www.gnu.org/software/emacs/manual/html_node/url/Retrieving-URLs.html

Current Buffer | http://www.gnu.org/software/emacs/manual/html_node/elisp/Current-Buffer.html

저작자 표시
Posted by steloflute
TAG , , , , ,


Generate bitcoin for me

What's this?

티스토리 툴바