Skip to content

Commit 7d02327

Browse files
committed
Fix examples in README
1 parent 18465c1 commit 7d02327

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following example uses the `awyeah-api` lib.
3939
;; and usually only relevant for non-Amazon or local setups
4040
#_#_:endpoint-override {:protocol :http
4141
:hostname "localhost"
42-
:port 9000}))
42+
:port 9000}}))
4343
```
4444

4545
Alternatively, the same data structure can be provided manually:
@@ -94,15 +94,15 @@ The following example illustrates how signing can be used from within a Babashka
9494
(require '[aws-simple-sign.core :as aws])
9595
(require '[babashka.http-client :as http])
9696

97-
(let [signed-request (-> {:url "https://someurl/some-api-endpoint"
98-
:method :post
99-
:headers {"accept" "application/json"}
100-
:body "{\"somekey\": \"with some value\"}"}
101-
(aws/sign-request {:region "us-west-1"}))]
97+
(let [request {:url "https://someurl/some-api-endpoint"
98+
:method :post
99+
:headers {"accept" "application/json"}
100+
:body "{\"somekey\": \"with some value\"}"}
101+
signed-request (aws/sign-request client request {:region "us-west-1"})]
102102

103-
(http/post (:url signed-request)
104-
(-> signed-request
105-
(select-keys [:body :headers]))))
103+
(http/post (:url signed-request)
104+
(-> signed-request
105+
(select-keys [:body :headers]))))
106106
```
107107

108108
[1]: https://github.com/cognitect-labs/aws-api

0 commit comments

Comments
 (0)