File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ The following example uses the `awyeah-api` lib.
39
39
; ; and usually only relevant for non-Amazon or local setups
40
40
#_#_:endpoint-override {:protocol :http
41
41
:hostname " localhost"
42
- :port 9000 }))
42
+ :port 9000 }} ))
43
43
```
44
44
45
45
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
94
94
(require '[aws-simple-sign.core :as aws])
95
95
(require '[babashka.http-client :as http])
96
96
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" })]
102
102
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 ]))))
106
106
```
107
107
108
108
[ 1 ] : https://github.com/cognitect-labs/aws-api
You can’t perform that action at this time.
0 commit comments