code reformat
This commit is contained in:
parent
31819abcaf
commit
c738a01ce4
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,6 +20,7 @@
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
.idea/**/*.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
|
@ -9,7 +9,9 @@
|
||||
class Logger {
|
||||
public:
|
||||
void logToLogfile(std::string text);
|
||||
|
||||
void safeip(std::string ip);
|
||||
|
||||
std::string readip();
|
||||
|
||||
};
|
||||
|
@ -18,7 +18,8 @@ std::string API::request(std::string myurl) {
|
||||
return request(std::move(myurl), false, map, str);
|
||||
}
|
||||
|
||||
std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::string> &map, std::vector<std::string> &headers) {
|
||||
std::string
|
||||
API::request(std::string myurl, bool post, Hashmap<std::string, std::string> &map, std::vector<std::string> &headers) {
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
|
||||
@ -66,7 +67,6 @@ std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::
|
||||
}
|
||||
|
||||
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readString);
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
class API {
|
||||
public:
|
||||
std::string request(std::string myurl);
|
||||
|
||||
std::string request(std::string myurl, bool post, Hashmap<std::string, std::string> &map, std::vector<std::string> &headers);
|
||||
|
||||
private:
|
||||
|
@ -9,10 +9,13 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
template <class keytype,class valuetype> class Hashmap {
|
||||
template<class keytype, class valuetype>
|
||||
class Hashmap {
|
||||
public:
|
||||
void add(keytype key, keytype value);
|
||||
|
||||
keytype getKey(int position);
|
||||
|
||||
valuetype getValue(int position);
|
||||
|
||||
int size();
|
||||
|
Loading…
Reference in New Issue
Block a user