summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-02-25 15:19:20 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-02-25 15:20:44 +0100
commitc5218e14ff7fe7817302a6c71d64c14389c33425 (patch)
tree6ad45d8c96812ddfef1912fce0671f81ed40373e
parentd78fe77f32a6ea0a81632e61a6461beb0d45a73a (diff)
request: Add request-query-string.
* aws/request.scm (request-query-string): New procedure.
-rw-r--r--aws/request.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/aws/request.scm b/aws/request.scm
index 7ccb6c6..45e725a 100644
--- a/aws/request.scm
+++ b/aws/request.scm
@@ -125,6 +125,15 @@
".")
thing))))
+(define (request-query-string operation-name api-version input)
+ "Return a request query string."
+ (string-join (cons* (format #false "Action=~a" operation-name)
+ (format #false "Version=~a" api-version)
+ (if input
+ (serialize-aws-value input)
+ '()))
+ "&"))
+
(define* (make-operation->request api-metadata)
"Return a procedure that accepts an operation and returns an HTTP request."
(define endpoint-prefix