Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::HTTPHeaders Struct Reference

Public Types

using header_map_t = case_insensitive_map_t<string>

Public Member Functions

 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)

Private Attributes

header_map_t headers

Constructor & Destructor Documentation

◆ HTTPHeaders()

duckdb::HTTPHeaders::HTTPHeaders ( DatabaseInstance & db)
explicit
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
db

Member Function Documentation

◆ 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 { // NOLINT: match stl API
53120 return headers.begin();
53121 }

◆ end() [1/2]

header_map_t::iterator duckdb::HTTPHeaders::end ( )
inline
53122 { // NOLINT: match stl API
53123 return headers.end();
53124 }

◆ begin() [2/2]

header_map_t::const_iterator duckdb::HTTPHeaders::begin ( ) const
inline
53125 { // NOLINT: match stl API
53126 return headers.begin();
53127 }

◆ end() [2/2]

header_map_t::const_iterator duckdb::HTTPHeaders::end ( ) const
inline
53128 { // NOLINT: match stl API
53129 return headers.end();
53130 }

◆ cbegin()

header_map_t::const_iterator duckdb::HTTPHeaders::cbegin ( ) const
inline
53131 { // NOLINT: match stl API
53132 return headers.begin();
53133 }

◆ cend()

header_map_t::const_iterator duckdb::HTTPHeaders::cend ( ) const
inline
53134 { // NOLINT: match stl API
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: