Sample code for 30+ languages & platforms
Lua

Example: Http.GetRequestHeader method

Demonstrates the GetRequestHeader method.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

local success = false

local http = chilkat.Http.new()

local hdr1 = "X-CSRF-Token"
local hdr2 = "X-Example"

http:set_request_header(hdr1, "Fetch")
http:set_request_header(hdr2, "123ABC")

print(hdr1 .. ": " .. http:get_request_header(hdr1))
print(hdr2 .. ": " .. http:get_request_header(hdr2))

-- Output:

-- X-CSRF-Token: Fetch
-- X-Example: 123ABC