1 | #ifndef CPR_PROXIES_H |
---|---|
2 | #define CPR_PROXIES_H |
3 | |
4 | #include <initializer_list> |
5 | #include <map> |
6 | #include <string> |
7 | |
8 | namespace cpr { |
9 | class Proxies { |
10 | public: |
11 | Proxies() = default; |
12 | Proxies(const std::initializer_list<std::pair<const std::string, std::string>>& hosts); |
13 | Proxies(const std::map<std::string, std::string>& hosts); |
14 | |
15 | bool has(const std::string& protocol) const; |
16 | const std::string& operator[](const std::string& protocol); |
17 | |
18 | private: |
19 | std::map<std::string, std::string> hosts_; |
20 | }; |
21 | } // namespace cpr |
22 | |
23 | #endif |
24 |