|
|
using | header_map_t = case_insensitive_map_t<string> |
|
| | HTTPHeaders (DatabaseInstance &db) |
| void | Insert (string key, string value) |
| bool | HasHeader (const string &key) const |
| string | GetHeaderValue (const string &key) const |
| header_map_t::iterator | begin () |
| header_map_t::iterator | end () |
| header_map_t::const_iterator | begin () const |
| header_map_t::const_iterator | end () const |
| header_map_t::const_iterator | cbegin () const |
| header_map_t::const_iterator | cend () const |
| header_map_t::mapped_type & | operator[] (const header_map_t::key_type &key) |
◆ HTTPHeaders()
293630 {
293631 headers.insert({
"User-Agent",
StringUtil::Format(
"%s %s",
db.config.UserAgent(), DuckDB::SourceID())});
293632}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002
◆ Insert()
| void duckdb::HTTPHeaders::Insert |
( |
string | key, |
|
|
string | value ) |
293634 {
293635 headers.insert(make_pair(std::move(key), std::move(value)));
293636}
◆ HasHeader()
| bool duckdb::HTTPHeaders::HasHeader |
( |
const string & | key | ) |
const |
293638 {
293639 return headers.find(key) != headers.end();
293640}
◆ GetHeaderValue()
| string duckdb::HTTPHeaders::GetHeaderValue |
( |
const string & | key | ) |
const |
293642 {
293643 auto entry = headers.find(key);
293644 if (entry == headers.end()) {
293645 throw InternalException("Header value not found");
293646 }
293647 return entry->second;
293648}
◆ begin() [1/2]
| header_map_t::iterator duckdb::HTTPHeaders::begin |
( |
| ) |
|
|
inline |
53119 {
53120 return headers.begin();
53121 }
◆ end() [1/2]
| header_map_t::iterator duckdb::HTTPHeaders::end |
( |
| ) |
|
|
inline |
53122 {
53123 return headers.end();
53124 }
◆ begin() [2/2]
| header_map_t::const_iterator duckdb::HTTPHeaders::begin |
( |
| ) |
const |
|
inline |
53125 {
53126 return headers.begin();
53127 }
◆ end() [2/2]
| header_map_t::const_iterator duckdb::HTTPHeaders::end |
( |
| ) |
const |
|
inline |
53128 {
53129 return headers.end();
53130 }
◆ cbegin()
| header_map_t::const_iterator duckdb::HTTPHeaders::cbegin |
( |
| ) |
const |
|
inline |
53131 {
53132 return headers.begin();
53133 }
◆ cend()
| header_map_t::const_iterator duckdb::HTTPHeaders::cend |
( |
| ) |
const |
|
inline |
53134 {
53135 return headers.end();
53136 }
◆ operator[]()
| header_map_t::mapped_type & duckdb::HTTPHeaders::operator[] |
( |
const header_map_t::key_type & | key | ) |
|
|
inline |
53137 {
53138 return headers[key];
53139 }
The documentation for this struct was generated from the following file: