diff options
author | turret <turret@duck.com> | 2024-01-18 18:52:27 -0600 |
---|---|---|
committer | turret <turret@duck.com> | 2024-01-18 18:52:27 -0600 |
commit | e6c7c2f3d683a5c15e2be15563e2f52d8aed91ed (patch) | |
tree | d2619b8e6e7c37ff799276170cb33beb99b0d649 /net/net.c | |
parent | 694ea524ca6e2d08bb648ded5c45d455a7b5d340 (diff) | |
download | discord-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |