I'm sure that this is simple, but I can't figure it out. I want to POST
to a cgi uri (non-lisp, not that that matters) from AllegroServe (or,
more generally, ACL). I know how to GET to it: e.g., (format nil
"http://uir/foo.cgi?arg1=~a&arg2=~a" arg1 arg2) ... but how do I do the
analogous thing to a server that's expecting its args from a POST
instead of from a GET?
The more specific answer is:
(NET.ASERVE.client::do-http-request
"http://whatever.com/cgi-bin/whatever.cgi"
:method :post
:query `(("key" . "value")
...))
Just like GET (but for the :method)
Dh-oh!
On Thu, 31 Aug 2006 15:01:06 -0700, JShrager wrote:
> I'm sure that this is simple, but I can't figure it out. I want to POST
> to a cgi uri (non-lisp, not that that matters) from AllegroServe (or,
> more generally, ACL). I know how to GET to it: e.g., (format nil
> "http://uir/foo.cgi?arg1=~a&arg2=~a" arg1 arg2) ... but how do I do the
> analogous thing to a server that's expecting its args from a POST
> instead of from a GET?
http://www.jmarshall.com/easy/http/#postmethod
You just remove the ? and append the rest of the `key=value'-things as a
body in the HTTP-request. Note that you must supply the `content-type' and
`content-length'-headers.
I assume you are doing this from the server/lisp-side?
--
Lars Rune Nøstdal
http://lars.nostdal.org/