summaryrefslogtreecommitdiff
path: root/discord/http.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-08-21 22:25:23 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2020-08-21 22:25:23 -0400
commit6b72931ba729bf6ede33cfa6877a5ad21e913c45 (patch)
tree83281f1a498b3cb855a68c78a4bb336b79e797bb /discord/http.cpp
parent6f11aa4dae4c7334b150752f5cf8d270ce746d9c (diff)
downloadabaddon-portaudio-6b72931ba729bf6ede33cfa6877a5ad21e913c45.tar.gz
abaddon-portaudio-6b72931ba729bf6ede33cfa6877a5ad21e913c45.zip
send chat messages
Diffstat (limited to 'discord/http.cpp')
-rw-r--r--discord/http.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/http.cpp b/discord/http.cpp
index db41aa4..d08fefe 100644
--- a/discord/http.cpp
+++ b/discord/http.cpp
@@ -37,20 +37,20 @@ void HTTPClient::MakePOST(std::string path, std::string payload, std::function<v
};
auto body = cpr::Body { payload };
#ifdef USE_LOCAL_PROXY
- m_futures.push_back(cpr::GetCallback(
+ m_futures.push_back(cpr::PostCallback(
std::bind(&HTTPClient::OnResponse, this, std::placeholders::_1, cb),
url, headers, body,
cpr::Proxies { { "http", "127.0.0.1:8888" }, { "https", "127.0.0.1:8888" } },
cpr::VerifySsl { false }));
#else
- m_futures.push_back(cpr::PatchCallback(
+ m_futures.push_back(cpr::PostCallback(
std::bind(&HTTPClient::OnResponse, this, std::placeholders::_1, cb),
url, headers, body));
#endif
}
void HTTPClient::MakeGET(std::string path, std::function<void(cpr::Response r)> cb) {
- printf("POST %s\n", path.c_str());
+ printf("GET %s\n", path.c_str());
auto url = cpr::Url { m_api_base + path };
auto headers = cpr::Header {
{ "Authorization", m_authorization },