From 81e0bc1834490a1a8092c75a0733b15c2b407285 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Sun, 5 Feb 2017 14:42:10 +0100 Subject: import: json: Explicitly ask for JSON data. * guix/import/json.scm (json-fetch): Add #:headers to http-fetch call. --- guix/import/json.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'guix/import') diff --git a/guix/import/json.scm b/guix/import/json.scm index 5940f5e48f..c76bc9313c 100644 --- a/guix/import/json.scm +++ b/guix/import/json.scm @@ -29,7 +29,8 @@ (guard (c ((and (http-get-error? c) (= 404 (http-get-error-code c))) #f)) ;"expected" if package is unknown - (let* ((port (http-fetch url)) + (let* ((port (http-fetch url #:headers '((user-agent . "GNU Guile") + (Accept . "application/json")))) (result (hash-table->alist (json->scm port)))) (close-port port) result))) -- cgit v1.2.3