mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-05 03:43:21 +02:00
MINOR: httpclient: support payload within a buffer
httpclient_req_gen() takes a payload argument which can be use to put a payload in the request. This payload can only fit a request buffer. This payload can also be specified by the "body" named parameter within the lua. httpclient. It is also used within the CLI httpclient when specified as a CLI payload with "<<".
This commit is contained in:
@@ -21,7 +21,7 @@ local function cron()
|
||||
core.Debug('CRON port:' .. vtc_port)
|
||||
|
||||
local httpclient = core.httpclient()
|
||||
local response = httpclient:get{url="http://127.0.0.1:" .. vtc_port}
|
||||
local response = httpclient:get{url="http://127.0.0.1:" .. vtc_port, body="foobar-is-the-new-toto"}
|
||||
|
||||
core.Info("Received: " .. response.body)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user