has linker error! but this should be a good start on breaking out our changes and web api into a standalone library/namespace

This commit is contained in:
DarthArgus
2016-04-27 21:54:10 +00:00
parent 52672794fe
commit baecfbebb6
8 changed files with 151 additions and 66 deletions
+18
View File
@@ -0,0 +1,18 @@
#ifndef webAPI_H
#define webAPI_H
#include "json.hpp"
#include <curl/curl.h>
namespace webAPI
{
std::string simplePost(std::string endpoint, std::string data, std::string slotName);
//std::string simpleGet(char* endpoint, char* data);
//nlohmann::json post(char* endpoint, char* data);
//nlohmann::json get(char* endpoint, char* data);
nlohmann::json request(std::string endpoint, std::string data, int reqType); // 1 for post, 0 for get
size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp);
};
#endif