Commit Graph

3 Commits

Author SHA1 Message Date
Zhidao HONG
33c6c4d4c0 NJS: variable access support
This commit introduces the 'vars' JavaScript object to NJS,
enabling direct access to native variables such as $uri and $arg_foo.
The syntax is `${vars.var_name}` or `${'vars[var_name]'}`.

For example:
    {
        "action": {
            "share": "`/www/html${vars.uri}`"
        }
    }
2024-02-20 06:09:23 +08:00
Zhidao HONG
141deec353 NJS: added the keys API for the request objects.
This commit is to loop through the request objects headers,
arguments, and cookies.
2023-01-17 10:37:45 +08:00
Zhidao HONG
e3bbf5b3b5 NJS: added http request prototype. 2022-11-22 10:13:18 +08:00