1 //! \file CurlUrlCreator.h
3 #ifndef _CURLURLCREATOR_H
4 #define _CURLURLCREATOR_H
7 #include <unordered_map>
10 /*! Creates GET URLs with parameters.
11 * With the help of curl
16 //! Create a new instance, given a base URL
17 CurlUrlCreator(std::string baseUrl
);
19 /*! Add GET parameters to URL.
20 * If parameter keys are specified multiple times, later occurrences
21 * overwrite earlier ones.
22 * \param param the parameter name
23 * \param value the parameter value - UNESCAPED!
24 * This will be done by curl. If you already escape
25 * it will be double-escaped.
26 * \return reference to self, so method chaining is possible.
28 CurlUrlCreator
& addParameter(std::string param
, std::string value
);
34 * \return Complete GET URL.
36 std::string
buildUrl();
42 std::unordered_map
<std::string
, std::string
> args
;
47 #endif /* _CURLURLCREATOR_H */