Lisp HUG Maillist Archive

Re: how to get contents of url

Way back in 2003, Edi Weitz wrote:
> Larry Eclipse" <leclipse <at> insightful.com> writes:
> 
> > Does lispworks have a function like wget or geturl in python that
> > returns the contents of a url given the url?  I know about cl-http
> > but I don't want to use it.
> 
> I don't think it has. However, acl-compat[1] (which works with LW)
> includes functionality to do that.
> 
> For a project of mine I wrote my own LW version of "wget" which
> supports GET and POST parameters, Cookies and SSL (using CL-SSL)
> because I wasn't aware of the fact that I could have used
> acl-compat. Let me know if you want me to mail it to you.

I'm looking for a similar GETURL function.  What's the best thing to
use?  

Is the best thing DO-HTTP-REQUEST in acl-compat?  or is there a newer
better thing that I don't know about?

Thanks!

Regards,
Chris Dean


Re: how to get contents of url

On Wed, 12 Oct 2005 11:45:14 -0700, Chris Dean <ctdean@sokitomi.com> wrote:

> I'm looking for a similar GETURL function.  What's the best thing to
> use?
>
> Is the best thing DO-HTTP-REQUEST in acl-compat?  or is there a
> newer better thing that I don't know about?

I think AllegroServe's DO-HTTP-REQUEST is still the most complete
function for this task.

Depending on what you need you might also be interested in Klaus
Harbo's patch to use persistent HTTP connections with this function:

  <http://sourceforge.net/mailarchive/message.php?msg_id=12179045>

Cheers,
Edi.


Re: how to get contents of url/relocation

Hi, this makes me asking a question. DO-HTTP-REQUEST indeed works very 
well, I tried it few times, but it seemed not to relocate the page, so if 
anybody knows how to get it relocating make a notice.

Pekka


Re: how to get contents of url/relocation

>Anyway, DO-HTTP-REQUEST usually does that automatically.  See the
>keyword arguments :REDIRECT and :REDIRECT-METHODS.  Specifically, if
>you're doing a POST then you won't be redirected with the default
>settings.
>
>I guess the short answer is: RTFM... :)
>
>Cheers,
>Edi.

Yea .. but on the other hand if I hadn't ask it would have taken me a long 
time to discover :-)

Thanks!!

Pekka



Re: how to get contents of url

On Oct 12, 2005, at 2:45 PM, Chris Dean wrote:

> I'm looking for a similar GETURL function.  What's the best thing to
> use?
>
> Is the best thing DO-HTTP-REQUEST in acl-compat?  or is there a newer
> better thing that I don't know about?


Another option is to write a simple wrapper around curl using  
system:call-system. It only takes a couple of functions and lets curl  
do all the hard work :). The hardest part is reading the curl  
documentation and understanding all of the options.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Updated at: 2020-12-10 08:50 UTC