Commit 42036802 authored by mucek4's avatar mucek4 Committed by Arnim Läuger
Browse files

Fixed http.post() example (#2734)

parent c55ef29a
...@@ -237,7 +237,7 @@ headers = { ...@@ -237,7 +237,7 @@ headers = {
["Content-Type"] = "application/json", ["Content-Type"] = "application/json",
} }
body = '{"hello":"world"}' body = '{"hello":"world"}'
http.post("http://httpbin.org/post", headers, body, http.post("http://httpbin.org/post", { headers = headers }, body,
function(code, data) function(code, data)
if (code < 0) then if (code < 0) then
print("HTTP request failed") print("HTTP request failed")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment