all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jarosław Rzeszótko" <sztywny@gmail.com>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: 16220@debbugs.gnu.org
Subject: bug#16220: url-http.el: Not conforming to HTTP spec
Date: Sun, 5 Jan 2014 14:25:09 +0100	[thread overview]
Message-ID: <CAHnYAZbsvw9FOH8ZNy-FMdMx=Q+Ry==bqCtMqkCbBkP9ZzEjzQ@mail.gmail.com> (raw)
In-Reply-To: <m3txdilpji.fsf@stories.gnus.org>

Hi,

2014/1/5 Lars Magne Ingebrigtsen <larsi@gnus.org>:
> This summer, I started rewriting url-retrieve and friends in the way
> that was discussed on emacs-devel a ... couple years back:
>
> (with-url "http://fsf.org" :timeout 10
>                            :concurrency 5
>                            :request-method "POST"
>                            :headers '(("Foo" . "Bar"))
>   (message "The result was: %s" (buffer-string)))
>
> but I kinda stopped before I really got started, because I couldn't
> figure out how to make this work in the non-lexical binding case.  And
> having this work only with lexical binding seemed kinda meh.
>
> You wouldn't happen to have any ideas in that area?  >"?

I think a natural way of representing the request if this was to be
designed today would be to use alists all the way, perhaps with
optional arguments for adjusting how precisely the request itself
should be sent and handled:

(http "http://www.fsf.org/xyz/zyx"
        '((method . "GET")
          (path . "/")
          (headers . (("Accept-Encoding" . "UTF-8")))
          (form . (("param1" . "value1"))))
         :timeout 10)

This breaks compatibility of course though, as do any sensible changes
I can think of. So meanwhile I would be happy if the patch got
accepted, it would at least make the library at all usable to me, even
if not the easiest to use.

Cheers,
Jarosław Rzeszótko





  reply	other threads:[~2014-01-05 13:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-22 20:52 bug#16220: url-http.el: Not conforming to HTTP spec Jarosław Rzeszótko
2013-12-22 21:55 ` Jarosław Rzeszótko
2013-12-22 22:33   ` Ted Zlatanov
2013-12-23  6:51     ` Jarosław Rzeszótko
2013-12-23 13:08       ` Ted Zlatanov
2013-12-24  7:50   ` Lars Ingebrigtsen
2013-12-24  8:28     ` Jarosław Rzeszótko
2013-12-24 14:43 ` Stefan Monnier
2013-12-24 16:31   ` Jarosław Rzeszótko
2014-01-02  2:21     ` Stefan Monnier
2014-01-03 18:06       ` Jarosław Rzeszótko
2014-01-05  9:57       ` Lars Magne Ingebrigtsen
2014-01-05 13:25         ` Jarosław Rzeszótko [this message]
2014-01-06 15:06         ` Stefan Monnier
2014-01-07 19:30           ` Jarosław Rzeszótko
2014-01-08 18:29             ` Stefan Monnier
2014-01-18 22:35 ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHnYAZbsvw9FOH8ZNy-FMdMx=Q+Ry==bqCtMqkCbBkP9ZzEjzQ@mail.gmail.com' \
    --to=sztywny@gmail.com \
    --cc=16220@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.