• geturl

    From saito@saitology9@gmail.com to comp.lang.tcl on Thu May 22 15:44:08 2025
    From Newsgroup: comp.lang.tcl

    Does anyone have a version of geturl with a few bells and whistles? Like following redirects, going through proxies, handling custom headers,
    uploading a file, etc? My use case will involve downloading which may
    include a file, and uploading content (i.e., file) with extra headers.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Schelte@nospam@wanadoo.nl to comp.lang.tcl on Thu May 22 23:20:40 2025
    From Newsgroup: comp.lang.tcl

    On 22/05/2025 21:44, saito wrote:
    Does anyone have a version of geturl with a few bells and whistles? Like following redirects, going through proxies, handling custom headers, uploading a file, etc? My use case will involve downloading which may include a file, and uploading content (i.e., file) with extra headers.

    Take a look at my www project: https://chiselapp.com/user/schelte/repository/www. It does at least some
    of what you ask about. Let me know if there is generally useful
    functionality you are missing.


    Schelte.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Rich@rich@example.invalid to comp.lang.tcl on Thu May 22 22:33:56 2025
    From Newsgroup: comp.lang.tcl

    saito <saitology9@gmail.com> wrote:
    Does anyone have a version of geturl with a few bells and whistles? Like following redirects, going through proxies, handling custom headers, uploading a file, etc? My use case will involve downloading which may include a file, and uploading content (i.e., file) with extra headers.

    tclcurl-fa (https://github.com/flightaware/tclcurl-fa) likely exposes
    all of those needs, but you do need to be able to compile a C
    extension in order to use it.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Thu May 22 20:00:10 2025
    From Newsgroup: comp.lang.tcl

    On 5/22/2025 5:20 PM, Schelte wrote:

    Take a look at my www project: https://chiselapp.com/user/schelte/ repository/www. It does at least some of what you ask about. Let me know
    if there is generally useful functionality you are missing.



    Thank you! That is indeed a very good option. I will play with it and
    see what I can do over the long weekend.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Thu May 22 20:05:23 2025
    From Newsgroup: comp.lang.tcl

    On 5/22/2025 6:33 PM, Rich wrote:


    tclcurl-fa (https://github.com/flightaware/tclcurl-fa) likely exposes
    all of those needs, but you do need to be able to compile a C
    extension in order to use it.

    Thank you! I will check out www first since it has no requirements.

    Interesting fact I just discovered: curl is now part of the MS Windows install. So if you are on a recent version of Windows, you can just
    issue curl commands on the command shell.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Rich@rich@example.invalid to comp.lang.tcl on Fri May 23 18:28:42 2025
    From Newsgroup: comp.lang.tcl

    saito <saitology9@gmail.com> wrote:
    On 5/22/2025 6:33 PM, Rich wrote:


    tclcurl-fa (https://github.com/flightaware/tclcurl-fa) likely exposes
    all of those needs, but you do need to be able to compile a C
    extension in order to use it.

    Thank you! I will check out www first since it has no requirements.

    Interesting fact I just discovered: curl is now part of the MS
    Windows install. So if you are on a recent version of Windows, you
    can just issue curl commands on the command shell.

    Ah, this is interesting news. I'll have to check on $job's W11 install
    to see if it includes a 'curl' now.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Sat May 31 15:17:33 2025
    From Newsgroup: comp.lang.tcl

    On 5/22/2025 5:20 PM, Schelte wrote:

    Take a look at my www project: https://chiselapp.com/user/schelte/ repository/www. It does at least some of what you ask about. Let me know
    if there is generally useful functionality you are missing.


    I just installed it and I am going through the docs now. It seems to be
    light on examples and use cases. It would be helpful if you could share
    some scripts using it.

    Thanks,

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Sat May 31 16:36:16 2025
    From Newsgroup: comp.lang.tcl

    On 5/22/2025 5:20 PM, Schelte wrote:

    Take a look at my www project: https://chiselapp.com/user/schelte/ repository/www. It does at least some of what you ask about. Let me know
    if there is generally useful functionality you are missing.


    I am sure I am missing something here with this simple example but what?

    % package req www
    2.6

    % www get https://www.yahoo.com
    too many attempts


    The same thing works with http::geturl:

    % http::geturl https://www.yahoo.com
    ::http::1
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Schelte@nospam@wanadoo.nl to comp.lang.tcl on Sun Jun 1 13:56:26 2025
    From Newsgroup: comp.lang.tcl

    On 31/05/2025 22:36, saito wrote:
    I am sure I am missing something here with this simple example but what?

    % package req www
    2.6

    % www get https://www.yahoo.com
    too many attempts

    I have been testing the package with tls 1.8. I guess you are using tls
    1.7 instead. There was a bug in adapting the command line arguments for
    that version. That has now been fixed in version 2.7 of the www package.


    Thanks,
    Schelte.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Schelte@nospam@wanadoo.nl to comp.lang.tcl on Sun Jun 1 14:02:26 2025
    From Newsgroup: comp.lang.tcl

    On 31/05/2025 21:17, saito wrote:
    I just installed it and I am going through the docs now. It seems to be light on examples and use cases. It would be helpful if you could share
    some scripts using it.

    The test suite exercises different use cases of the commands. You can
    take a look there for some usage examples.


    Schelte.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Sun Jun 1 14:54:06 2025
    From Newsgroup: comp.lang.tcl

    On 6/1/2025 7:56 AM, Schelte wrote:

    I have been testing the package with tls 1.8. I guess you are using tls
    1.7 instead. There was a bug in adapting the command line arguments for
    that version. That has now been fixed in version 2.7 of the www package.


    Yes this was the cause. I can confirm that the new version runs ok on
    that url and others I a few others tried. I will be testing it in the
    next few days.

    Thank you.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From saito@saitology9@gmail.com to comp.lang.tcl on Wed Jun 4 11:34:57 2025
    From Newsgroup: comp.lang.tcl

    On 5/22/2025 5:20 PM, Schelte wrote:

    Take a look at my www project: https://chiselapp.com/user/schelte/ repository/www. It does at least some of what you ask about. Let me know
    if there is generally useful functionality you are missing.



    Since you asked for new functionality :-)

    I think a method that would take a response body and mime parse it into individual components would be a great addition. I believe the package
    is doing this already when constructing the request. Something similar
    on the response would make it easier for users of the package. What do
    you think?



    --- Synchronet 3.21a-Linux NewsLink 1.2