]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
buildservice: Tell the API that we would like to receive JSON
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Jun 2025 11:46:36 +0000 (11:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Jun 2025 11:46:36 +0000 (11:46 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/buildservice.c

index 179f6109bc839ef53281de83f74ebe898c456298..8b3ec5c707ed0cd6d50a904b4563b85b17b22b7e 100644 (file)
@@ -74,6 +74,11 @@ static int pakfire_buildservice_xfer_create(struct pakfire_xfer** xfer,
        if (r < 0)
                goto ERROR;
 
+       // Tell the API that we want to receive a JSON response
+       r = pakfire_xfer_add_header(x, "Accept: application/json");
+       if (r < 0)
+               goto ERROR;
+
        // Success
        *xfer = pakfire_xfer_ref(x);