Toast/TriviaBot/bot/http/HTTPHelper.hpp
Jack 6b2464bad4 Fix messages occasionally not going through
Discord API will occasionally throw 502 Bad Gateway errors. Retrying
normally means this is not a problem.
2016-07-21 14:07:05 +01:00

16 lines
345 B
C++

#ifndef BOT_HTTP_HTTPHELPER
#define BOT_HTTP_HTTPHELPER
#include <iostream>
#include <curl/curl.h>
class HTTPHelper {
public:
std::string post_request(std::string url, std::string content_type, std::string data, long *response_code);
private:
static size_t write_callback(void *contents, size_t size, size_t nmemb, void *userp);
};
#endif