From: Bastian Dehn Date: Sat, 20 Jan 2024 20:51:12 +0000 (+0100) Subject: add register user to scanner X-Git-Tag: v1.0.0^2~503 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=6ca407b3568090fc03c5e63562bbffb8d307972c;p=sane-kds-s2000w-net.git add register user to scanner --- 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;