aws/request: make-operation->request: Define PAYLOAD-HASH.
[software/guile-aws.git] / aws / request.scm
index abaabb7127503ac4aa7e55c7f3c97760218a88c0..faa5e0dc8580196bcfeaa9043628685cb570d36d 100644 (file)
                           (serialize-aws-value input))
                    "&"))
 
+    (define payload-hash
+      (hexify (sha256 (string->utf8 request-parameters))))
+
     (define now (current-date 0))
     (define amz-date
       (date->string now "~Y~m~dT~H~M~SZ"))
                                  canonical-querystring
                                  canonical-headers
                                  signed-headers
-                                 ;; The payload hash
-                                 (hexify (sha256 (string->utf8 request-parameters))))
+                                 payload-hash)
                            "\n"))
              (credential-scope
               (string-join (list date-stamp