summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-03-02 22:57:31 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-03-02 22:57:31 +0100
commit5b2a70412abd48dfdd1f20bec93a19bbe2d89c4c (patch)
treee465564529e5bb0450dfe32148fb22b7cf56cb39
parent79678762ec1a77376c36aa5097d1951516ecc0b7 (diff)
aws/request: Use JSON for "rest-json" APIs.
-rw-r--r--aws/request.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/aws/request.scm b/aws/request.scm
index 630112e..e8ade5c 100644
--- a/aws/request.scm
+++ b/aws/request.scm
@@ -217,6 +217,7 @@ corresponding value in INPUT."
(define json?
(match (assoc-ref api-metadata 'protocol)
("json" #true)
+ ("rest-json" #true)
(_ #false)))
(define content-type
(if json?
@@ -337,7 +338,8 @@ corresponding value in INPUT."
(utf8->string bv))
((? string? s) s))))
(match (response-content-type response)
- (('application/x-amz-json-1.1 . rest)
+ ((or ('application/x-amz-json-1.1 . rest)
+ ('application/json . rest))
(json-string->scm server-text))
(('text/xml . rest)
(xml->sxml server-text))