mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
26 lines
942 B
C++
26 lines
942 B
C++
#pragma once
|
|
|
|
#include <optional>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <base/types.h>
|
|
#include <Poco/Net/HTTPResponse.h>
|
|
#include <Poco/Util/AbstractConfiguration.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
using HTTPResponseHeaderSetup = std::optional<std::unordered_map<String, String>>;
|
|
|
|
HTTPResponseHeaderSetup parseHTTPResponseHeaders(const Poco::Util::AbstractConfiguration & config, const std::string & config_prefix);
|
|
|
|
std::unordered_map<String, String> parseHTTPResponseHeaders(
|
|
const Poco::Util::AbstractConfiguration & config, const std::string & config_prefix, const std::string & default_content_type);
|
|
|
|
std::unordered_map<String, String> parseHTTPResponseHeaders(const std::string & default_content_type);
|
|
|
|
void applyHTTPResponseHeaders(Poco::Net::HTTPResponse & response, const HTTPResponseHeaderSetup & setup);
|
|
|
|
void applyHTTPResponseHeaders(Poco::Net::HTTPResponse & response, const std::unordered_map<String, String> & setup);
|
|
}
|