title: “HTTP::ADDQUERY” author: “laplante@plcb.ca” date: 2023-11-28 version: “1.0.0” section: “1g”
http::addquery Adds parameters to the query string.
http::addquery or addquery([overwrite: bool, error: err, map…, name:value…])
The addquery function adds parameters to the query string of the current request.
true, any existing query parameters are removed and replaced by the new ones.This function is useful for dynamically constructing or modifying query strings during request handling.
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"}.