proxies.cpp
Go to the documentation of this file.
1 #include "cpr/proxies.h"
2 
3 #include <initializer_list>
4 #include <map>
5 #include <string>
6 #include <utility>
7 
8 namespace cpr {
9 
10 Proxies::Proxies(const std::initializer_list<std::pair<const std::string, std::string>>& hosts)
11  : hosts_{hosts} {}
12 
13 bool Proxies::has(const std::string& protocol) const {
14  return hosts_.count(protocol) > 0;
15 }
16 
17 const std::string& Proxies::operator[](const std::string& protocol) {
18  return hosts_[protocol];
19 }
20 
21 } // namespace cpr
::std::string string
Definition: gtest-port.h:1129
std::map< std::string, std::string > hosts_
Definition: proxies.h:20
bool has(const std::string &protocol) const
Definition: proxies.cpp:13
const std::string & operator[](const std::string &protocol)
Definition: proxies.cpp:17
Definition: auth.cpp:3


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:16