1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-28 13:07:12 +02:00
Files
bin
module
vendor
CPR
cmake
cpr
include
cpr
api.h
auth.h
bearer.h
body.h
callback.h
connect_timeout.h
cookies.h
cpr.h
cprtypes.h
curl_container.h
curlholder.h
digest.h
error.h
limit_rate.h
low_speed.h
max_redirects.h
multipart.h
ntlm.h
parameters.h
payload.h
proxies.h
response.h
session.h
ssl_options.h
status_codes.h
timeout.h
unix_socket.h
user_agent.h
util.h
verbose.h
CMakeLists.txt
CMakeLists.txt
CONTRIBUTING.md
LICENSE
README.md
cpr-config.cmake
ConcurrentQueue
Fmt
MaxmindDB
POCO
SimpleIni
Squirrel
TinyDir
CMakeLists.txt
.gitignore
.gitmodules
CMakeLists.txt
LICENSE
README.md
SqMod/vendor/CPR/include/cpr/curl_container.h
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

51 lines
1.1 KiB
C++

#ifndef CURL_CONTAINER_H
#define CURL_CONTAINER_H
#include <initializer_list>
#include <memory>
#include <string>
#include <vector>
#include "cpr/curlholder.h"
namespace cpr {
struct Parameter {
Parameter(const std::string& key, const std::string& value) : key{key}, value{value} {}
Parameter(std::string&& key, std::string&& value)
: key{std::move(key)}, value{std::move(value)} {}
std::string key;
std::string value;
};
struct Pair {
Pair(const std::string& p_key, const std::string& p_value) : key(p_key), value(p_value) {}
Pair(std::string&& p_key, std::string&& p_value)
: key(std::move(p_key)), value(std::move(p_value)) {}
std::string key;
std::string value;
};
template <class T>
class CurlContainer {
public:
CurlContainer() = default;
CurlContainer(const std::initializer_list<T>&);
void Add(const std::initializer_list<T>&);
void Add(const T&);
const std::string GetContent(const CurlHolder&) const;
protected:
std::vector<T> containerList_;
};
} // namespace cpr
#endif //