Turi Create  4.0
web_util.hpp
1 /* Copyright © 2017 Apple Inc. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-3-clause license that can
4  * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5  */
6 #ifndef TURI_WEB_UTIL_HPP
7 #define TURI_WEB_UTIL_HPP
8 
9 #include <string>
10 #include <map>
11 
12 
13 namespace turi {
14  namespace web_util {
15 
16  /**
17  * \brief decode a url by converting escape characters
18  */
19  std::string url_decode(const std::string& url);
20 
21  /**
22  * \brief convert a query string into a map
23  */
24  std::map<std::string, std::string> parse_query(const std::string& query);
25 
26  } // end of namespace web_util
27 
28 }; // end of namespace Turi
29 #endif