• lightweight communication to the web in Common Lisp

    From Mark Tarver@21:1/5 to All on Tue Dec 7 15:20:35 2021
    I'm looking for a lightweight program in Common Lisp for communicating to
    the web. Should take a URL and return the contents of the site. Should accept https sites. A code sample like (get-url "mywebsite.org") would be cool.

    If it can push data via ftp and passwords etc. even better.

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Madhu@21:1/5 to All on Wed Dec 8 08:57:25 2021
    * Mark Tarver <dc46baf0-e749-47aa-bac1-2c0a2951da1an@googlegroups.com> :
    Wrote on Tue, 7 Dec 2021 15:20:35 -0800 (PST):

    I'm looking for a lightweight program in Common Lisp for communicating to
    the web. Should take a URL and return the contents of the site.
    Should accept https sites. A code sample like (get-url
    "mywebsite.org") would be cool.

    This usually has to be a wrapper around the (necessary complexity) functionality that the client has to expose

    If it can push data via ftp and passwords etc. even better.

    The usual suspects are edi weitz' drakma https://github.com/edicl/drakma
    and `fukamachi's https://github.com/fukamachi/dexador - but these come
    with the stack of dependencies and the subsequent dependence on
    quicklisp.

    A lightweight (light on dependencies) alternative was Jeff Massung's
    suite of tools which included a http client
    https://github.com/massung/http this was for CCL at the time I used it.
    This worked well for me until he switched it over to SBCL-only, though I
    had a stab at keeping CCL compatibility

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephane Tougard@21:1/5 to Mark Tarver on Fri Dec 10 09:31:46 2021
    On 2021-12-07, Mark Tarver <dr.mtarver@gmail.com> wrote:
    I'm looking for a lightweight program in Common Lisp for communicating to
    the web. Should take a URL and return the contents of the site. Should accept https sites. A code sample like (get-url "mywebsite.org") would be cool.


    CL-USER(1): (ql:quickload 'drakma)
    To load "drakma":
    Load 7 ASDF systems:
    asdf chunga cl+ssl cl-base64 cl-ppcre flexi-streams
    usocket
    Install 3 Quicklisp releases:
    chipz drakma puri
    ; Loading "drakma"
    [package puri]....................................
    [package chipz]...................................
    [package drakma]........
    (DRAKMA)
    CL-USER(2): (drakma:http-request "https://www.google.com")


    If it can push data via ftp and passwords etc. even better.

    I don't think it does FTP, but it surely does all those kinds of things in HTTP.

    For FTP

    CL-USER(4): (ql:system-apropos "ftp")
    #<SYSTEM cl-ftp / cl-ftp-20150608-http / quicklisp 2021-10-21>
    #<SYSTEM fftpack5 / f2cl-20200925-git / quicklisp 2021-10-21>
    #<SYSTEM fftpack5-double / f2cl-20200925-git / quicklisp 2021-10-21>
    #<SYSTEM ftp / cl-ftp-20150608-http / quicklisp 2021-10-21>
    CL-USER(5):

    Never tested, however FTP is a simple protocol, quite sure it does all
    that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Madhu@21:1/5 to All on Fri Dec 10 15:09:55 2021
    * Stephane Tougard <isfb8i-0s91.ln1@superman.unices.org> :
    Wrote on Fri, 10 Dec 2021 09:31:46 +0100:

    [drakma]
    If it can push data via ftp and passwords etc. even better.

    I don't think it does FTP, but it surely does all those kinds of things in HTTP.

    For FTP

    CL-USER(4): (ql:system-apropos "ftp")
    #<SYSTEM cl-ftp / cl-ftp-20150608-http / quicklisp 2021-10-21>
    #<SYSTEM fftpack5 / f2cl-20200925-git / quicklisp 2021-10-21>
    #<SYSTEM fftpack5-double / f2cl-20200925-git / quicklisp 2021-10-21>
    #<SYSTEM ftp / cl-ftp-20150608-http / quicklisp 2021-10-21>

    Never tested, however FTP is a simple protocol, quite sure it does all
    that.

    Compared to HTTP/1.0, FTP is pretty complex. It negotiates and opens a separate connection see the PASV command.

    most univ sites have stopped serving ftp. firefox dropped support for
    ftp. citing maintanence is not a change for something so tested. there
    is considerable capital-investment from above in killing off ftp.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)