Reputation: 23
I try add more headers to httpCall
method, but upstream can't received.
example lua script:
lua
request_handle:httpCall(
"service1",
{
[":method"] = "POST",
[":path"] = "/",
[":authority"] = "lua_cluster",
[":authorization"] = "Basic 123456"
},
"",
1000)
Does it have 3 headers?
Upvotes: 1
Views: 1632
Reputation: 4001
You can define any header as below.
request_handle:httpCall(
"service1",
{
[":method"] = "POST",
[":path"] = "/",
[":authority"] = "lua_cluster",
["authorization"] = "Basic 123456",
["any-header"] = "header-value"
},
"",
1000)
Upvotes: 1