mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added extra parameter for specifying extra HTTP response headers
This commit is contained in:
parent
380b176c48
commit
b2c437a641
1 changed files with 3 additions and 2 deletions
|
|
@ -135,11 +135,12 @@ function rest_utils.extended_answer(ret_const, payload, additional_response_para
|
|||
print(rest_utils.rc(ret_const, payload, additional_response_param, format))
|
||||
end
|
||||
|
||||
function rest_utils.vanilla_payload_response(ret_const, payload, content_type)
|
||||
function rest_utils.vanilla_payload_response(ret_const, payload, content_type, extra_headers)
|
||||
if content_type == nil then
|
||||
content_type = "text/plain"
|
||||
end
|
||||
sendHTTPHeader(content_type, nil, {}, ret_const.http_code)
|
||||
if(extra_headers == nil) then extra_headers = {} end
|
||||
sendHTTPHeader(content_type, nil, extra_headers, ret_const.http_code)
|
||||
print(payload)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue