From 6ca407b3568090fc03c5e63562bbffb8d307972c Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 20 Jan 2024 21:51:12 +0100 Subject: [PATCH] add register user to scanner --- src/kds_s2000w_handler.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/kds_s2000w_handler.c b/src/kds_s2000w_handler.c index b043fdf..78dd436 100644 --- a/src/kds_s2000w_handler.c +++ b/src/kds_s2000w_handler.c @@ -8,9 +8,13 @@ void* kds_s2000w_handler_open() printf("open\n"); CURL *curl = curl_easy_init(); if(curl) { + printf("curl\n"); CURLcode res; - curl_easy_setopt(curl, CURLOPT_URL, "https://scanner.lan.hhaalo.de"); + curl_easy_setopt(curl, CURLOPT_URL, "http://scanner.lan.hhaalo.de/api/session"); + curl_easy_setopt(curl, CURLOPT_POST, 1L); + curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"OCPUserName\":\"hhaalo\"}"); res = curl_easy_perform(curl); + printf("curlcode: %li\n", res); curl_easy_cleanup(curl); } return NULL; -- 2.39.5