^^ 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
cool, thanks once again
sheesh to illegal access... Clojure is not a crime! ;)
hmm
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,....
wonder where to look next
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
haa, there’s stuff in the (-> (meta response) :http-response :body slurp)
I guess it’s just not deserialized?
user=> (-> (meta response) :http-response :body slurp)
"{\"_links\":{\"curies\":[{\"href\":\"<http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-authorizer-{rel}.html\>",\"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.
yeah, S3 api is XML
over 10 years old
Api Gateway is this funny Hypertext Application Language (HAL) thing https://docs.aws.amazon.com/apigateway/api-reference/index.html
would be well suited for Datafy/nav I guess 🙂
I’ve never seen HAL before interesting
some other aws api uses HAL too, don’t remember which now
where’s my rebl now
maybe something like this to unhal: https://github.com/portkey-cloud/aws-clj-sdk/blob/master/src/portkey/aws.clj#L182-L197
but hum, trying to grok how the deserialization is done in aws-api
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 🙂