From 134ca7ec223e1d24b23ae6a8894d844baaf15c2b Mon Sep 17 00:00:00 2001 From: Erik Prabowo Kamal Date: Tue, 3 Sep 2019 16:22:28 +0800 Subject: Managed to get user properties after having the cookie. --- rtclient.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rtclient.c b/rtclient.c index 59c80e6..cad4047 100644 --- a/rtclient.c +++ b/rtclient.c @@ -73,6 +73,12 @@ void rtclient_login(const char *name, const char *password) #endif // ANDROID } #endif // DEBUG + static const char *user_path = "/REST/1.0/user/"; + char user_url[strlen(server_url) + strlen(user_path) + strlen(name) + 1]; + sprintf(user_url, "%s%s%s", server_url, user_path, name); + curl_easy_setopt(handle, CURLOPT_URL, user_url); + curl_easy_setopt(handle, CURLOPT_HTTPGET, 1L); + curl_easy_perform(handle); } void rtclient_cleanup() -- cgit v1.2.3