HTTP::ADDQUERY 1g 2023-11-28 laplante@plcb.ca GOWEB/HTTP


title: “HTTP::ADDQUERY” author: “laplante@plcb.ca” date: 2023-11-28 version: “1.0.0” section: “1g”

category: “GOWEB/HTTP”

HTTP::ADDQUERY

Name

http::addquery Adds parameters to the query string.

Synopsis

http::addquery or addquery([overwrite: bool, error: err, map…, name:value…])

Description

The addquery function adds parameters to the query string of the current request.

This function is useful for dynamically constructing or modifying query strings during request handling.

Examples

res={{
    "1="; getdata(); "\n";
    addquery(overwrite:true, "pierre":"laplante", {"x":1,"y":2});
    "2="; getdata(); "\n";
    "3="; getquery();
}}.

call with:

http://goweb.plcb.ca/tests/http1/test-007?a=b&c=d

return

res=1={"a":"b","c":"d","uuid":"976b32bf-f063-453c-acae-d3e81b37aab2"}
2={"a":"b","c":"d","uuid":"f58121e5-1a30-406d-9507-054716cc451b"}
3={"pierre":"laplante","x":"1","y":"2"}.

See also

Version