aboutsummaryrefslogtreecommitdiffstats
path: root/net/net.c
diff options
context:
space:
mode:
authorturret <turret@duck.com>2024-01-18 18:52:27 -0600
committerturret <turret@duck.com>2024-01-18 18:52:27 -0600
commite6c7c2f3d683a5c15e2be15563e2f52d8aed91ed (patch)
treed2619b8e6e7c37ff799276170cb33beb99b0d649 /net/net.c
parent694ea524ca6e2d08bb648ded5c45d455a7b5d340 (diff)
downloaddiscord-bot-skeleton-e6c7c2f3d683a5c15e2be15563e2f52d8aed91ed.tar.gz
discord-bot-skeleton-e6c7c2f3d683a5c15e2be15563e2f52d8aed91ed.tar.bz2
discord-bot-skeleton-e6c7c2f3d683a5c15e2be15563e2f52d8aed91ed.zip
api: extensify api api
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/net.c b/net/net.c
index 94aa067..b8938c0 100644
--- a/net/net.c
+++ b/net/net.c
@@ -11,11 +11,11 @@
#include <cJSON.h>
#include <curl/curl.h>
+#include <api.h>
#include <init.h>
#include <log.h>
#include <subsys.h>
-extern int http_get(char *url);
extern void ws_handle_event(cJSON *event);
extern void ws_send_heartbeat();
CURL *ws_handle;
@@ -149,7 +149,7 @@ void net_get_gateway_url()
panic("net: wss not supported by libcurl");
/* fetch preferred url from discord */
- int fd = http_get("https://discord.com/api/gateway/bot");
+ int fd = api_get("/gateway/bot", NULL, NULL, 0);
if(fd < 0) {
print(LOG_ERR "net: cannot get gateway url: %s", curl_easy_strerror(-fd));
goto assume;