diff Sphinx/source/users/lua.rst @ 283:443af82172b0

added a sample of headers for HttpPost lua method
author amazy
date Tue, 17 Sep 2019 09:53:17 +0200
parents eaad8233e474
children be69f8c86f56
line wrap: on
line diff
--- 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