1#ifndef TENDUKE_NET_URLBUILDER_H
2#define TENDUKE_NET_URLBUILDER_H
4#include "./URLEncoder.h"
12namespace tenduke {
namespace net {
25 explicit URLBuilder(std::shared_ptr<const tenduke::net::URLEncoder> urlEncoder);
68 std::string
pctEncode(
const std::string &value);
72 const std::string &name,
73 const std::string &value
77 const std::shared_ptr<const tenduke::net::URLEncoder> urlEncoder;
80 std::vector<std::pair<std::string, std::string>> parameters;
Very simple URL-builder.
Definition URLBuilder.h:19
std::string buildString()
Builds to URL into a string.
Definition URLBuilder.cpp:10
URLBuilder & queryParameters(const std::map< std::string, std::string > &pParameters)
Sets multiple query parameters.
Definition URLBuilder.cpp:51
URLBuilder & baseURL(const std::string &url)
Sets the base URL.
Definition URLBuilder.cpp:36
URLBuilder & queryParameter(const std::string &name, const std::string &value="")
Adds an encoded query parameter.
Definition URLBuilder.cpp:42
URLBuilder & queryParameterUnencoded(const std::string &name, const std::string &value="")
Adds an unencoded query parameter.
Definition URLBuilder.cpp:59
std::string pctEncode(const std::string &value)
PCT-encodes given string.
Definition URLBuilder.cpp:68
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4