If you wish to make arbitrary HTTP(S) requests to websites and APIs, e.g. to update statistics on bot lists, you can use code similar to the code below. You may pass any arbitrary POST data:
#include <iostream>
std::string mypostdata = "{\"value\": 42}";
bot.request(
std::cout <<
"I got reply: " << cc.
body <<
" with HTTP status code: " << cc.
status <<
"\n";
},
mypostdata,
"application/json",
{
{"Authorization", "Bearer tokengoeshere"}
}
);
});
return 0;
}