|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef CRESTAPI_REQUEST_H
6 #define CRESTAPI_REQUEST_H
12 #include "nlohmann/json.hpp"
14 #include <curl/curl.h>
91 void setHost(
const std::string& host);
92 void setPort(
const std::string& port);
119 const char *method_name,
const std::string& header_params =
"");
127 const std::string&
objectType,
const std::string& compressionType,
const std::string&
version,
128 const std::vector<std::string>&
files);
130 void checkResult(CURLcode
res,
long response_code,
const std::string& st,
const char* method_name);
134 #endif // CRESTAPI_REQUEST_H
std::string make_url(const std::string &address) const
std::string parseXMLOutput(const std::string_view xmlBuffer)
std::string performRequest(const std::string ¤t_path, Action action, nlohmann::json &js, const std::string &header_params="")
General auxiliary method to make request to the CREST Server.
std::string uploadPayload(const std::string ¤t_path, const std::string &tag, uint64_t endtime, const nlohmann::json &js, const std::string &objectType, const std::string &compressionType, const std::string &version, const std::vector< std::string > &files)
void setPrefix(const std::string &prefix)
void checkResult(CURLcode res, long response_code, const std::string &st, const char *method_name)
nlohmann::json getJson(const std::string &str, const char *method)
void setHost(const std::string &host)
std::string removeCR(const std::string &str)
bool isJson(const std::string &str)
std::pair< std::vector< unsigned int >, bool > res
std::vector< char > getPayloadRequest(const std::string ¤t_path)
void add(const std::string &key, const std::string &value)
int checkErrors(const nlohmann::json &js, const char *method)
const char * m_CREST_PROXY_VAR
void setPort(const std::string &port)
const std::string & getParams() const