• Re: making http request with gforth

    From okflo@okflo@news.teletyp.ist to comp.lang.forth on Sat Oct 25 15:49:50 2025
    From Newsgroup: comp.lang.forth

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    Hi anton,

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    okflo@teletyp.ist writes:
    okflo@teletyp.ist writes:
    - I use global variables (in the dictionary) for curl-data and
    response-code. What would be the right way to do this locally in
    http-request? The usual locals are on a stack IMHO - so I would need
    to allocate cells?

    It seems to me that variable-flavoured locals would work here, i.e.:

    : http-request ( method url-addr url-len -- status content-addr content-len ) >> {: w^ curl-data w^ response-code :}

    Actually:

    : http-request ( method url-addr url-len -- status content-addr content-len )
    0 0 {: w^ curl-data w^ response-code :}

    - anton

    many thanks anton! liebe grüße aus salzburg
    --- Synchronet 3.21a-Linux NewsLink 1.2