suve

awful: function: cookie-val

Declaration

string :cookie-val ( string $NAME )
string :cookie-val ( int $NUM )

Summary

When passed an int, returns the value of the NUM-th HTTP Cookie present.
When passed a string, returns the value associated with cookie of given name.

Example

# Cookie test.
:writeln s'Cookies set: ' :cookie-num
:set &C i0
!while :lt $C :cookie-num
    :writeln s'Cookie' $C s': ' (:cookie-key $C) s'=' :cookie-val $C
    :add &C i1
    !done

wikipage modified on 2014/0601/2317