Jack
6b2464bad4
Discord API will occasionally throw 502 Bad Gateway errors. Retrying normally means this is not a problem.
16 lines
345 B
C++
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 |