2016-07-10 01:18:13 +01:00
|
|
|
#ifndef BOT_HTTP_HTTPHELPER
|
|
|
|
#define BOT_HTTP_HTTPHELPER
|
|
|
|
|
2016-07-05 00:51:53 +01:00
|
|
|
#include <iostream>
|
|
|
|
|
2016-07-10 01:18:13 +01:00
|
|
|
#include <curl/curl.h>
|
|
|
|
|
2016-07-05 00:51:53 +01:00
|
|
|
class HTTPHelper {
|
|
|
|
public:
|
2016-07-10 01:18:13 +01:00
|
|
|
std::string post_request(std::string url, std::string content_type, std::string data);
|
2016-07-05 00:51:53 +01:00
|
|
|
|
|
|
|
private:
|
2016-07-10 01:18:13 +01:00
|
|
|
static size_t write_callback(void *contents, size_t size, size_t nmemb, void *userp);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|