HCoop
/
jackhill
/
guix
/
guix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4554813
)
import: json: Explicitly ask for JSON data.
author
Federico Beffa
<beffa@fbengineering.ch>
Sun, 5 Feb 2017 13:42:10 +0000
(14:42 +0100)
committer
Federico Beffa
<beffa@fbengineering.ch>
Thu, 9 Feb 2017 18:36:04 +0000
(19:36 +0100)
* guix/import/json.scm (json-fetch): Add #:headers to http-fetch call.
guix/import/json.scm
patch
|
blob
|
blame
|
history
diff --git
a/guix/import/json.scm
b/guix/import/json.scm
index
5940f5e
..
c76bc93
100644
(file)
--- 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)))