From 5b2a70412abd48dfdd1f20bec93a19bbe2d89c4c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 2 Mar 2021 22:57:31 +0100 Subject: aws/request: Use JSON for "rest-json" APIs. --- aws/request.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'aws/request.scm') 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)) -- cgit v1.2.3