# HG changeset patch # User amazy # Date 1568706797 -7200 # Node ID 443af82172b0d70784c44034f66e88cf46309e43 # Parent d96894c0c554861d343992279825d6deec1c1230 added a sample of headers for HttpPost lua method diff -r d96894c0c554 -r 443af82172b0 Sphinx/source/users/lua.rst --- a/Sphinx/source/users/lua.rst Thu Sep 12 11:38:30 2019 +0200 +++ b/Sphinx/source/users/lua.rst Tue Sep 17 09:53:17 2019 +0200 @@ -196,6 +196,14 @@ The ``headers`` argument is optional and was added in release 1.2.1. It allows to set the HTTP headers for the HTTP client request. +Example:: + + local preview = RestApiGet('/instances/' .. instanceId .. '/preview') + local headers = { + ["content-type"] = "image/png", + } + HttpPost("http://localhost/my-web-service/instance-preview", preview, headers) + .. _lua-origin: Origin of the instances