From 983074cc8724f690948355d8962466d5b6cacb00 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sat, 21 Feb 2026 18:49:18 +0100 Subject: Add the protocol to the curl example --- src/html.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/html.c') diff --git a/src/html.c b/src/html.c index 20007f9..ec7064c 100644 --- a/src/html.c +++ b/src/html.c @@ -409,7 +409,7 @@ char *html_render_clients_page(const char *host, const struct ListClientResult * return buf; } -char *html_render_client_detail_page(const char *host, const struct GetClientOnlyResult *client_result, const struct GetBackupsResult *backups_result, size_t *out_len) { +char *html_render_client_detail_page(const char *host, const char* proto, const struct GetClientOnlyResult *client_result, const struct GetBackupsResult *backups_result, size_t *out_len) { // Determine status and staleness int is_stale = 0; const char *current_status = "OK"; @@ -468,14 +468,15 @@ char *html_render_client_detail_page(const char *host, const struct GetClientOnl "
\n" " How To\n" "
\n" - "
curl -s -X POST %s \\\n"
+		"        
curl -s -X POST %s://%s \\\n"
 		"    -H \"Content-Type: application/json\" \\\n"
 		"    -d \'{\"client\": \"%s\", \"secret\": \"%s\", \"event\": \"begin_backup\"}\'"
 		        "
\n" "
\n" "
\n", client_result->secret, - host ? host : "localhost", + proto != NULL ? proto : "http", + host != NULL ? host : "localhost", client_result->name, client_result->secret ); -- cgit v1.2.3