summaryrefslogtreecommitdiff
path: root/meta/3rd/OpenResty/library/ngx/resp.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-08-13 01:23:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-08-13 01:23:32 +0800
commit04fa96b7c0abba4d7cca03ed12ff3b65b3912e01 (patch)
treec0c8a2c0e92d0580280f838ba475875c7f82a73c /meta/3rd/OpenResty/library/ngx/resp.lua
parentc30c5c2e267f6917600afe4f19e1e0d674bad9c6 (diff)
downloadlua-language-server-04fa96b7c0abba4d7cca03ed12ff3b65b3912e01.zip
fix #1431
Diffstat (limited to 'meta/3rd/OpenResty/library/ngx/resp.lua')
-rw-r--r--meta/3rd/OpenResty/library/ngx/resp.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/3rd/OpenResty/library/ngx/resp.lua b/meta/3rd/OpenResty/library/ngx/resp.lua
new file mode 100644
index 00000000..c2de299a
--- /dev/null
+++ b/meta/3rd/OpenResty/library/ngx/resp.lua
@@ -0,0 +1,23 @@
+---@meta
+local resp={}
+
+resp.version = require("resty.core.base").version
+
+--- This function adds specified header with corresponding value to the response of current request.
+---
+--- The `header_value` could be either a string or a table.
+---
+--- The ngx.resp.add_header works mostly like:
+---
+--- `ngx.header.HEADER`
+--- Nginx's `add_header` directive.
+---
+--- However, unlike `ngx.header.HEADER`, this method appends new header to the old one instead of overriding it.
+---
+--- Unlike `add_header` directive, this method will override the builtin header instead of appending it.
+---
+---@param key string
+---@param value string|string[]
+function resp.add_header(key, value) end
+
+return resp \ No newline at end of file