emacs-devel
[Top][All Lists]
Advanced

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

Re: more url-utils?


From: Chong Yidong
Subject: Re: more url-utils?
Date: Sun, 15 May 2011 09:34:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

address@hidden writes:

> 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
>     (widen)
>     (goto-char (point-min))
>     (search-forward "\n\n")
>     (delete-region (point-min) (point))
>     buffer))

Good idea, though maybe the wrapper function should incorporate
url-http-parse-response too (see the package-handle-response function in
package.el).  Please feel free to propose a patch.



reply via email to

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