This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-20
Channels
- # adventofcode (47)
- # announcements (3)
- # aws (29)
- # bangalore-clj (3)
- # beginners (63)
- # boot (2)
- # braveandtrue (40)
- # calva (34)
- # cider (37)
- # cljs-dev (8)
- # clojars (3)
- # clojure (45)
- # clojure-europe (2)
- # clojure-france (4)
- # clojure-india (2)
- # clojure-italy (44)
- # clojure-japan (4)
- # clojure-nl (39)
- # clojure-serbia (1)
- # clojure-spec (21)
- # clojure-uk (75)
- # clojurescript (28)
- # cursive (24)
- # data-science (3)
- # datomic (31)
- # emacs (13)
- # fulcro (35)
- # hoplon (21)
- # jobs-discuss (66)
- # nrepl (18)
- # off-topic (72)
- # pathom (35)
- # re-frame (20)
- # reagent (54)
- # shadow-cljs (35)
- # spacemacs (9)
- # specter (8)
- # sql (13)
- # testing (9)
- # tools-deps (21)
- # vim (3)
^^ for general info
I think in this particular case, it’s fixed in newer versions of jetty and those may get bumped in the deps chain soon
0% cat deps.edn
{:deps {org.clojure/clojure {:mvn/version "1.10.0"}
com.cognitect.aws/api {:mvn/version "0.8.158"}
com.cognitect.aws/endpoints {:mvn/version "1.1.11.467"}
com.cognitect.aws/s3 {:mvn/version "680.2.370.0"}
com.cognitect.aws/apigateway {:mvn/version "668.2.364.0"}}}
kimmoko@MACTN0AFH040 dev /tmp
0% clj -Srepro
Clojure 1.10.0
user=> (require '[cognitect.aws.client.api :as aws])
nil
user=> (def apigw-client (aws/client {:api :apigateway}))
2018-12-20 16:09:35.111:INFO::main: Logging initialized @12592ms
#'user/apigw-client
user=> (aws/invoke apigw-client {:op :GetRestApis})
{}
user=> ^D
kimmoko@MACTN0AFH040 dev /tmp
0% aws apigateway get-rest-apis
{
"items": [
{
"id": "6e071va237",
"name": "chatAPI",
"createdDate": 1479113133,....
is the problem that you don’t have any or that you can’t see them?
a check with aws console would tell you the answer
iam may also be affecting what you see I presume
oh, you checked at the end, I didn’t see that
I believe the request / response stuff is in the meta of the op return - that might tell you something
user=> (-> (meta response) :http-response :body slurp)
"{\"_links\":{\"curies\":[{\"href\":\"",\"name\":\"authorizer\",\...
In other SDKs like the javascript SDK, the http response body is a string. Probably makes sense because I don’t think response body is consistently json across all endpoints.
Api Gateway is this funny Hypertext Application Language (HAL) thing https://docs.aws.amazon.com/apigateway/api-reference/index.html
I’ve never seen HAL before interesting
maybe something like this to unhal: https://github.com/portkey-cloud/aws-clj-sdk/blob/master/src/portkey/aws.clj#L182-L197
anyway, response in metadata is a neat thing, it means the lib is usable even though there isn’t a parser for the response yet
if it’s not yet, it would be good to file an issue for aws-api
filed https://github.com/cognitect-labs/aws-api/issues/30, just had to make sure I did’t do something foolish myself 🙂