aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-04-30 19:32:07 +0200
committerChristopher Baines <mail@cbaines.net>2023-04-30 19:32:07 +0200
commit6a8fab1bf60d948cf28e624dd0fb363a11d281cd (patch)
treeb3904d9b899977e94cb541eff7d8744d294bcfaa
parent294b9d49e53ab22ac578c2548f799e16f74155de (diff)
downloadbffe-6a8fab1bf60d948cf28e624dd0fb363a11d281cd.tar
bffe-6a8fab1bf60d948cf28e624dd0fb363a11d281cd.tar.gz
Figured out passing the accept header
Solution, when Guile says "Bad value for header", just add more parens.
-rw-r--r--bffe/server.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/bffe/server.scm b/bffe/server.scm
index 4c24559..3df8e55 100644
--- a/bffe/server.scm
+++ b/bffe/server.scm
@@ -458,7 +458,8 @@
body
(http-get
(string->uri
- (string-append event-source "/agent/" agent-id)))))
+ (string-append event-source "/agent/" agent-id))
+ #:headers '((accept . ((application/json)))))))
(case (most-appropriate-mime-type
'(application/json text/html)
mime-types)
@@ -477,7 +478,8 @@
(http-get
(string->uri
(string-append event-source "/agent/" agent-id
- "/build-allocation-plan")))))
+ "/build-allocation-plan"))
+ #:headers '((accept . ((application/json)))))))
(render-json
(json-string->scm
(utf8->string body)))))