bes  Updated for version 3.20.6
url_parser.h
1 
2 // https://stackoverflow.com/questions/2616011/easy-way-to-parse-a-url-in-c-cross-platform
3 
4 #ifndef URL_HH_
5 #define URL_HH_
6 #include <string>
7 
8 namespace AWSV4 {
9 
10 struct url_parser {
11 public:
12  // omitted copy, ==, accessors, ...
13  explicit url_parser(const std::string &url_s) {
14  parse(url_s);
15  }
16 
17  std::string protocol() const { return protocol_; }
18 
19  std::string host() const { return host_; }
20 
21  std::string path() const { return path_; }
22 
23  std::string query() const { return query_; }
24 
25 private:
26  void parse(const std::string &url_s);
27 
28  std::string protocol_, host_, path_, query_;
29 };
30 
31 } // namespace AWSV4
32 #endif /* URL_HH_ */
AWSV4::url_parser
Definition: url_parser.h:10