commit | 746e6f3f8efe5646201f8d49d833393bacbc8c02 | [log] [tgz] |
---|---|---|
author | William Lallemand <wlallemand@haproxy.org> | Wed Oct 06 10:57:44 2021 +0200 |
committer | William Lallemand <wlallemand@haproxy.org> | Wed Oct 06 15:21:02 2021 +0200 |
tree | 57ccb3db9d420911b1a2f276d2be0b1b63d3a336 | |
parent | ef574b2101458d3af6b4c1453a7b5edadf001b66 [diff] |
MINOR: httpclient/lua: supports headers via named arguments Migrate the httpclient:get() method to named arguments so we can specify optional arguments. This allows to pass headers as an optional argument as an array. The () in the method call must be replaced by {}: local res = httpclient:get{url="http://127.0.0.1:9000/?s=99", headers= {["X-foo"] = { "salt" }, ["X-bar"] = {"pepper" }}}