File indexing completed on 2025-01-18 10:02:33
0001 #pragma once
0002
0003 #include <iostream>
0004 #include <vector>
0005 #include <stdexcept>
0006 #include <chrono>
0007 #include <curl/curl.h>
0008 #include <nlohmann/json.hpp>
0009
0010 #include <nopayloadclient/config.hpp>
0011 #include <nopayloadclient/exception.hpp>
0012 #include <nopayloadclient/logger.hpp>
0013
0014
0015 namespace nopayloadclient {
0016
0017 using nlohmann::json;
0018 using std::string;
0019
0020 class CurlWrapper {
0021 public:
0022 CurlWrapper() {};
0023 CurlWrapper(const json& ) {};
0024 virtual ~CurlWrapper() = default;
0025
0026
0027 virtual json get(const string& url) = 0;
0028
0029 virtual json del(const string& url) = 0;
0030 virtual json put(const string& url) = 0;
0031 virtual json put(const string& url, const json& data) = 0;
0032 virtual json post(const string& url, const json& data) = 0;
0033 };
0034
0035 }