[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more url-utils?

From: joakim
Subject: more url-utils?
Date: Sat, 14 May 2011 12:32:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

I feel the url functions have become really useful with the addition of
the xml parser and shr, but we can do better still.

Would the defun below be suitable to include in url-util?
You nearly always want to work with the data part of the document.
The code snippet below occurs a lot in different packages.

A wrapper that downloads a file(like curl or wget) would be nice also.

(defun org-feed-skip-http-headers (buffer)
  "Remove HTTP headers from BUFFER, and return it.
Assumes headers are indeed present!"
  (with-current-buffer buffer
    (goto-char (point-min))
    (search-forward "\n\n")
    (delete-region (point-min) (point))
Joakim Verona

reply via email to

[Prev in Thread] Current Thread [Next in Thread]